Nodes/ComfyUI-OpenDiTWrapper/(Down)Load OpenSora VAE
ComfyUI Node

(Down)Load OpenSora VAE

The VAE that understands time — not the one you already have

By kijai·Created 2 years ago·Updated 2 years ago· 43
(Down)Load OpenSora VAE
    • opendit_vae
    model
    precisionbf16

    If you've run any Stable Diffusion or Flux workflow, you already know what a VAE does: it compresses pixels into a compact latent the diffusion model can work in, then stretches them back out. The OpenSora VAE does the same thing - except it also compresses time. Standard ComfyUI VAEs are image-only; a video latent has five dimensions (batch, channels, frames, height, width), and the stock VAE Decode node will just choke on that shape. That's why this pack ships its own.

    What it loads

    This node loads OpenSora-VAE-v1.2 from hpcai-tech, downloading it from HuggingFace on first run into ComfyUI/models/opensora and skipping the *ema* files. Like its sibling loaders in the pack, it parks the VAE on ComfyUI's offload device until it's needed, which is a big part of why this pack runs in 15GB where the original OpenSora repo wanted a server.

    It's also chunked for memory: the VAE encodes video in micro-batches (17 frames at a time, batch size 4) rather than all at once. Video latents are big, and doing the whole clip in one pass is how you OOM on a 12GB card.

    Inputs and output

    • model - the only choice is hpcai-tech/OpenSora-VAE-v1.2. Leave it.
    • precision - bf16 (default), fp16, fp32. bf16 again.

    The output opendit_vae is typed as a plain VAE, which tells you something nice: this isn't just a step inside the OpenDiT graph. Because it carries the temporal compression logic in the class itself, you could wire it into ordinary image nodes too - though you'll almost never want to, since the OpenDiT nodes are built around it. In practice opendit_vae feeds three places: OpenDiTSampler (to build the latent size), OpenSoraEncodeReference (to encode your reference image), and OpenSoraDecode (to turn the sampled latent back into frames).

    Installing

    Same story as every node in this pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kijai/ComfyUI-OpenDiTWrapper
    pip install -r requirements.txt
    pip install xformers --no-deps
    

    or find "ComfyUI-OpenDiTWrapper" in ComfyUI Manager and let it handle both. On the Windows portable build, run those pip commands through python_embeded\python.exe instead. Restart ComfyUI afterward, and let the first queue run spend a while downloading the checkpoint.

    Gotchas

    The VAE downloads on first use, so your first workflow run looks frozen for a bit - that's the snapshot pulling. Keep the opendit_vae output wired through the graph rather than re-loading the node per section; the pack caches loaded models on the node instance, so one VAE feeding everything is cheaper than three separate ones. And don't bother trying to decode OpenSora latents with the regular VAE Decode node - the shapes don't line up, and that's precisely why OpenSoraDecode exists.

    CategoryOpenDitWrapper

    Inputs (2)

    NameTypeDefaultDescription
    modelCOMBO1 options: hpcai-tech/OpenSora-VAE-v1.2
    precisionCOMBObf163 options: fp16, bf16, fp32

    Outputs (1)

    NameTypeDescription
    opendit_vaeVAE