Nodes/SaveVideoRGBA/Save Video (RGBA)
ComfyUI Node

Save Video (RGBA)

Your transparent video dies at the save step — this node is the fix

By yolain·Created 11 months ago·Updated 6 months ago· 46
Save Video (RGBA)
  • images
  • audio
    fps24
    filename_prefixvideo/ComfyUI
    only_previewfalse

    Say you've just generated a video with Wan-Alpha, the WeChatCV framework that bakes a real alpha channel into every frame so you get transparent video straight out of the model - no background removal, no guesswork, clean edges by construction. You wire it up, hit queue, and the ComfyUI preview looks right. Then you export through the stock Save Video node and... the transparency is gone, burned into black.

    That's not you doing something wrong. The stock save node (and pretty much every MP4 pipeline) writes H.264, and H.264 has no alpha channel - the A in RGBA simply has nowhere to go. SaveVideoRGBA is the same idea as the built-in node, but it actually preserves that fourth channel instead of silently dropping it. It's a tiny utility from yolain - the person behind ComfyUI-Easy-Use - and it's the difference between "transparent video" being a demo trick and something you can drop into After Effects or Nuke.

    How it works

    The node takes your IMAGE tensor (batch of frames, B×H×W×C), checks if C == 4, and if it is, treats that last channel as alpha. From there it leans on PyAV to re-encode rather than letting ComfyUI's default path flatten everything to RGB.

    The clever bit is the split. For the in-UI preview it writes a WebM using the VP9 codec (yuva420p) - the one format browsers can show with transparency, so the ComfyUI preview genuinely looks transparent. For the real save it writes a .mov with ProRes 4444 (yuva444p10le), the 10-bit format video editors actually want for compositing. No alpha on your frames? It behaves like a normal save node: MP4, H.264, done. It'll even quietly resize odd frame dimensions down to an even number (codecs require even dimensions), so don't panic if the log shows a resolution one pixel less than you set.

    One quirk worth knowing: this node is written against ComfyUI's newer comfy_api node API, with a fallback to its own encoder. In practice it wants a reasonably recent ComfyUI - an install from 2024 will choke on it.

    The inputs that matter

    Only a few are worth touching:

    • images - the IMAGE tensor. Plug in whatever comes out of your VAE decode. The node figures out alpha on its own.
    • fps - default 24, range 1–120. Set it to match your generation, or the saved video plays back at the wrong speed.
    • filename_prefix - default video/ComfyUI. Supports the usual %date:yyyy-MM-dd% formatting tokens, so you can do %date:yyyy-MM-dd%/wan_alpha.
    • only_preview - leave this off unless you want a quick check. With it on, it renders the WebM preview and skips the file save entirely.
    • audio - optional; it muxes it in (Opus for WebM, AAC otherwise).

    It has no outputs - it's a terminal node. Wire it at the end of the graph and grab the file from the output folder.

    Installing it

    Via ComfyUI Manager, search "SaveVideoRGBA" and hit Install. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yolain/SaveVideoRGBA
    

    Restart ComfyUI. There's no separate pip step - it uses PyAV, which ComfyUI already bundles for its own video output.

    The actual setup cost is the models, because this node exists to serve the Wan-Alpha pipeline: the Wan 2.1 T2V 14B diffusion model, the umt5_xxl_fp8 text encoder, the LightX2V step-distillation LoRA, the RGBA DoRA (epoch-13-1500_changed.safetensors), and two VAE decoders - one RGB, one alpha. All links are in the README. Yes, that's ~30GB of downloads for the 14B stack; no way around it if you want transparent video locally. The good news: the repo ships a ready-made wan_alpha_t2v_14B.json workflow, so you don't have to build the graph from scratch.

    Gotchas

    • The .safetensors.safetensors filenames are not a typo - the Wan-Alpha VAE files on HuggingFace are literally named wan_alpha_2.1_vae_rgb_channel.safetensors.safetensors. Don't "fix" them, the workflow expects them as-is.
    • The saved file is a .mov, not the WebM you saw in the preview. ProRes 4444 files are huge - a 5-second 720p clip can easily be hundreds of MB. That's the price of 10-bit alpha, and editors love it, but it'll eat your disk if you batch.
    • The .mov lands in your output folder but may not show in the UI's saved-files list - the node only reports the preview file to the frontend when alpha is present. Check the folder on disk.
    • WebM/VP9 is a dead end for delivery. It's for previewing. For anything you actually ship, convert the ProRes .mov to whatever your target needs afterwards.

    If your use case is compositing generated subjects into live footage or game assets, this node plus Wan-Alpha is the whole game. If you're only saving ordinary opaque video, the stock node already does that - this one is for people who need the fourth channel to survive.

    Categoryimage/animation

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGE
    fpsFLOAT241–120
    filename_prefixSTRINGvideo/ComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.
    only_previewBOOLEANfalse
    audiooptAUDIO

    Outputs (0)

    No outputs