CogVideo Decode
Turning CogVideoX latents into actual frames
- vae
- samples
- images
The sampler gives you a latent, which is not something you can watch. This node is the last step that turns it into real, viewable frames. It runs the latent through the CogVideoX VAE and outputs an image batch - one image per frame - that you then hand to a video-combine node to save as an mp4. Every CogVideoX workflow ends here (or one node before the file save).
The catch with video VAE decoding is memory. A full clip of latents decoded all at once can blow past your VRAM in a heartbeat, because you're reconstructing every frame at full resolution simultaneously. So this node decodes in tiles - chunks of the frame at a time - and stitches them back together. That's what most of the settings are about.
The inputs that matter
Two are the real inputs: vae (from your loader node) and samples (the LATENT from CogVideo Sampler). The rest is tiling control:
enable_vae_tiling(default on) - the big one. On, it decodes in tiles to keep VRAM sane. Turn it off only if you have memory to spare and want to avoid any chance of tile seams. On most cards, leave it on.auto_tile_size(default on) - lets the node pick sensible tile dimensions for you. Leave it on unless you're hand-tuning.tile_sample_min_height/tile_sample_min_width(240 / 360) - the tile size, used when you turnauto_tile_sizeoff. Smaller tiles use less VRAM but risk visible seams and are slower.tile_overlap_factor_height/tile_overlap_factor_width(both 0.2) - how much neighboring tiles overlap so the seams blend. More overlap = smoother joins, a bit more compute.
The single output, images (an IMAGE batch), goes to whatever saves or previews your video - most commonly a Video Combine node from the VideoHelperSuite pack, which assembles the frames into a playable file at your chosen framerate.
How to install it
It's part of the CogVideoX wrapper:
- ComfyUI Manager - search ComfyUI-CogVideoXWrapper, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-CogVideoXWrapper, thenpip install -r ComfyUI-CogVideoXWrapper/requirements.txt, restart.
You'll almost certainly also want the VideoHelperSuite pack for the Video Combine node that saves the output - the decode node hands you frames, not a file.
Common issues & troubleshooting
Out of memory at the decode step. Very common - decoding is a VRAM spike even when sampling fit fine. Make sure enable_vae_tiling is on. If it's on and you still OOM, turn auto_tile_size off and set smaller tile_sample_min_height/_width values so each tile is cheaper.
Faint grid lines or seams in the output. That's tiling showing through. Raise the overlap factors so tiles blend more, or bump the tile size up if you have the memory. The overlap defaults of 0.2 are usually enough, but very smooth gradients (skies, fog) are where seams sneak in.
Output is noise or wildly wrong colors. Wrong VAE. The VAE feeding this node has to be the CogVideoX one that matches your model - either the vae output from a download loader, or a CogVideoX VAE Loader if you used the model-only loader. A mismatched VAE decodes to garbage.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| samples | LATENT | — | |
| enable_vae_tiling | BOOLEAN | true | Drastically reduces memory use but may introduce seams |
| tile_sample_min_height | INT | 24016–2048 | Minimum tile height, default is half the height |
| tile_sample_min_width | INT | 36016–2048 | Minimum tile width, default is half the width |
| tile_overlap_factor_height | FLOAT | 0.2000–1 | — |
| tile_overlap_factor_width | FLOAT | 0.2000–1 | — |
| auto_tile_size | BOOLEAN | true | Auto size based on height and width, default is half the size |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |