π§ TransparentVideoSave
The node that gets your transparent animation out as PNGs (and a WebP preview)
- images_rgb
- images_alpha
If you've ever cut an animated subject out of a background - BiRefNet matting, RMBG, or a LayerDiffusion-style RGBA pipeline - you've hit the same wall: the ComfyUI side of the job is getting the transparency out. Core save nodes write opaque video, and a PNG sequence is a hundred loose files. TransparentVideoSave is a purpose-built exporter for exactly this: it takes your RGB frames plus an alpha matte, writes a clean animated WebP preview so you can check the result, and - this is the actual deliverable - bundles the transparent frames into a single ZIP of RGBA PNGs you can drop into After Effects, DaVinci, or a web build.
How it works
You feed it two image streams that have to match frame-for-frame: images_rgb (your frames) and images_alpha (the matte). The alpha input is treated as an image where the node averages the three channels - so a standard white-on-black mask or a grayscale matte works, as long as all channels are the same. It then does two things per frame:
- Builds the preview: composites the RGB over a gray checkerboard using the alpha (
rgb Γ alpha + checkerboard Γ (1 β alpha)) and saves the sequence as an animated WebP. That's what plays back in the UI. - Builds the real output: encodes each frame as a true RGBA PNG and stuffs the whole sequence into a ZIP beside the WebP, named like
ComfyUI_00001.zip.
The distinction matters, because it's the one thing that surprises people: the WebP is not actually transparent. It has a checkerboard baked in as the background - it's a preview so you can see the cutout against something. The actual transparency lives in the PNG ZIP. If you need a genuinely transparent video container (a WebM with an alpha track), this node won't hand you one; it gives you the frames and you assemble the rest.
The WebP controls are PIL's, passed straight through: lossless (on by default), quality (ignored when lossless is on), and method - a small dropdown mapping to PIL's encoder method, where "fastest", "default" and "slowest" trade encode time for file size. fps sets the animation speed (16 is a reasonable default for drafts). It also embeds your workflow prompt metadata into the WebP unless you've disabled metadata globally, matching what core save nodes do.
The trap in this pack's install
Here's the thing to know before you even get to use it: TransparentVideoSave imports cv2 (OpenCV) at the top of its file, but requirements.txt for the pack lists only numpy, torch and Pillow. OpenCV is not declared, and ComfyUI core doesn't install it either. On a machine that lacks it, the pack fails at import time - and since the pack's __init__.py imports everything at once, a missing cv2 takes down every node in ComfyUI-Studio-nodes, not just this one. If you install the pack and the whole "STUDIO NODES" menu is empty, this is why. Fix:
cd <your ComfyUI python env> # venv, portable, etc.
pip install opencv-python # or opencv-python-headless
Then restart. The other practical gotcha is frame matching: if your RGB and alpha streams come from different points in the graph (or a batch gets reordered), frames silently misalign - the node does no length checking, it just zips them together. Wire both from the same branch when you can.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/comfyuistudio/ComfyUI-Studio-nodes
Restart, find "TransparentVideoSave" under image/animation - plus install OpenCV as above. It's a tiny single-commit pack; the short transparentvideosave.py is worth a skim if you want to confirm exactly what ends up in that ZIP before you rely on it for a delivery.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images_rgb | IMAGE | β | |
| images_alpha | IMAGE | β | |
| filename_prefix | STRING | ComfyUI | β |
| fps | FLOAT | 16.000.01β1000 | β |
| lossless | BOOLEAN | true | β |
| quality | INT | 800β100 | β |
| method | COMBO | 3 options: default, fastest, slowest |
Outputs (0)
No outputs