Nodes/ComfyUI PyramidFlow Wrapper/PyramidFlow VAE Decode
ComfyUI Node

PyramidFlow VAE Decode

Turning latents into frames without OOMing

By kijai·Created 2 years ago·Updated 2 years ago· 363
PyramidFlow VAE Decode
  • vae
  • samples
  • images
tile_sample_min_size256
overlap_factor0.25
window_size2
enable_tilingtrue

PyramidFlow VAE Decode is the last stop on every PyramidFlow render: it takes the latents the sampler produced and turns them into actual image frames you can look at, save, or hand to a video writer. It's the node that separates "a number tensor I can't see" from "a video."

The decoding VAE here is a full causal video autoencoder, and that's a heavy piece of machinery. Video latents have a temporal dimension, and decoding all of it in one go will happily blow past your VRAM on a mid-range card. So this node's default posture is defensive: it decodes in tiles, with overlap between tile boundaries so seams don't show, and it chunks the temporal dimension too. You can turn all that off, but you probably shouldn't.

The inputs

  • vae - the PyramidFlow VAE object from PyramidFlow VAE Loader. Not a filename, not a stock VAE - the wrapper's own loaded VAE, because it needs to match this model's latent space.
  • samples - the LATENT output of PyramidFlow Sampler.
  • enable_tiling - true by default, and the right call for anything above tiny resolutions. Decodes spatially in overlapping tiles. On a big card at small resolutions you can disable it for a marginal speed gain.
  • tile_sample_min_size - default 256. The floor for tile size; raise it if you want bigger tiles (fewer tile boundaries, more VRAM), lower it if you're memory-starved.
  • overlap_factor - default 0.25. How much neighboring tiles overlap, as a fraction. More overlap = smoother seams, more redundant work.
  • window_size - default 2. This is the temporal chunk size: how many frames decode at once. It's a 1–4 slider; on lower VRAM drop it to 1. The decoder's output is unaffected except for the seam between chunks.

The node does one thing you should know about so its outputs don't surprise you: it applies different normalization factors to the first frame vs the rest. PyramidFlow's latent space is asymmetric - the first frame is scaled like an image latent, the video frames use a separate shift and scale. This node handles that split automatically, which is exactly why you don't just pipe these latents into ComfyUI's generic VAE Decode and expect correct colors.

The output

images (IMAGE) - a stack of frames in B T H W C order flattened to (B*T) H W C, which is exactly what Video Helper Suite's VHS_VideoCombine expects. The example workflows in the pack go sampler → this node → Video Combine, and that's the whole video production line.

Install

Part of the pack, nothing extra: ComfyUI Manager → "PyramidFlow Wrapper", or git clone https://github.com/kijai/ComfyUI-PyramidFlowWrapper into custom_nodes, restart. The VAE weights are the pyramid_flow_vae_bf16.safetensors file from Kijai/pyramid-flow-comfy, dropped in ComfyUI/models/vae. If decode OOMs, your lever order is: window_size → 1, then tile_sample_min_size down toward 64, then reduce video length at the sampler. And a sanity note: the previews you see during sampling are the fast latent preview, not this decode - if your final video looks sharper and better-colored than the preview, nothing's wrong, that's the VAE doing its real job.

CategoryPyramidFlowWrapper

Inputs (6)

NameTypeDefaultDescription
vaePYRAMIDFLOWVAE
samplesLATENT
tile_sample_min_sizeINT25664–512
overlap_factorFLOAT0.250–1
window_sizeINT21–4
enable_tilingBOOLEANtrue

Outputs (1)

NameTypeDescription
imagesIMAGE