Nodes/ComfyUI-vlo/vlo Save Video Websocket
ComfyUI Node

vlo Save Video Websocket

A 'Save Video' that hands the clip to the frontend from memory

By PxTicks·Created 4 months ago·Updated 10 days ago· 0
vlo Save Video Websocket
  • video
    filename_prefixvideo/ComfyUI
    formatauto
    codecauto

    Save Video writes a file to your output directory and tells you where it went. vlo Save Video Websocket is the same operation aimed at a different consumer: it encodes the video, holds the bytes in memory, and emits a websocket result entry so the frontend can grab the clip immediately - no file on disk, no polling an output folder.

    That's the shape of the deal when the consumer is vlo, the local open-source video editor this pack bridges to. vlo's frontend lives in the browser and reads generation results straight off the websocket; a file-based Save Video would force it to wait for disk writes and then fetch a path it wasn't told about. This node hands it everything it needs in one message: the encoded bytes in the in-memory registry plus a view_url to pull them from.

    Inputs

    • video (VIDEO) - what you're saving. Wire it from a VAE decode or the tail of a video pipeline.
    • filename_prefix (default video/ComfyUI) - the name prefix for the in-memory result. Formatting tokens follow the same rules as Save Video, so %counter%, dates and the like work here too.
    • format (default auto) - the container (mp4, webm, and friends). auto picks a sensible default.
    • codec (default auto) - the codec for the encode.

    No outputs - it's an output node, terminal in the branch.

    How it works

    Under the hood it behaves like Save Video up to the last step: it encodes the video into a memory buffer using your chosen format and codec, with workflow metadata embedded unless you've disabled it. Then, instead of writing to output, it registers the bytes in the shared vlo memory registry and returns a result entry carrying the filename, content type, and a view_url pointing at the registry. The frontend reads that entry off the socket and fetches - the clip never touches a filesystem path, which is exactly why the memory loaders exist on the other end of the same pipe.

    The gotchas

    • Fetch promptly. Registry items expire: unread ones after two hours, and once accessed, after ten minutes. If the frontend dawdles, the clip ages out and the view_url 404s.
    • It's memory, not a hard drive. The registry dies when ComfyUI restarts. Anything you genuinely want to keep needs a real Save Video too.
    • Naming tokens behave like Save Video, so a prefix of video/ComfyUI creates a subfolder-style path - keep it simple unless you mean the hierarchy.

    Install

    Part of ComfyUI-vlo:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PxTicks/ComfyUI-vlo.git
    

    Restart ComfyUI (or install via ComfyUI Manager as "ComfyUI-vlo"). No models to download; the encode path is the same stack current ComfyUI already ships.

    Categoryapi/video

    Inputs (4)

    NameTypeDefaultDescription
    videoVIDEOThe video to expose to the frontend.
    filename_prefixSTRINGvideo/ComfyUIThe filename prefix to use for the in-memory video result. Formatting tokens follow the same rules as Save Video.
    formatCOMBOautoThe container format to use for the emitted video.
    codecCOMBOautoThe codec to use for the emitted video.

    Outputs (0)

    No outputs