HunyuanVideo Vae Decode
Turning latents back into the video you actually see
- latents
- vae
- hyvid_cfg
- sr_out
- image
The last stop on the HunyuanVideo 1.5 production line. HyVideo15VaeDecode takes the denoised transformer_latent that HyVideo15Transformer produced and runs it through the 3D causal VAE decoder to get actual video frames - the IMAGE tensor every downstream video node in ComfyUI wants. It's the mirror of HyVideo15VaeEncode, and in the complete workflow it's the node your preview and save nodes connect to.
What it does
- latents -
HYVID15TRANSFORMERLATENTfromHyVideo15Transformer. That's the 5D tensor (batch, channels, frames, height, width) in the model's latent space. - vae - from
HyVideo15VaeLoader. - hyvid_cfg - from
HyVideo15CFG; it supplies the RNG so decode is reproducible and the video count for shaping the output. - output_type (pt) -
ptreturns pixel frames;latentskips the decode and hands back the tensor raw, for people doing multi-stage work. - vae_dtype (float16) - decode precision. float16 is the memory-conscious default.
- sr_out - optional
HYVID15SROUTfromHyVidelSrVaeDecoder. Here's the neat bit: when you run the super-resolution branch, this node merges the base decode and the SR decode, and the output uses the higher-resolution SR frames. That's how the SR pass slots into the normal workflow without a separate preview path. - vae_autocast_enabled (true) - lets decode run under autocast; keep it on.
Output image (IMAGE) is ready for SaveVideo, CreateVideo, or a preview node. One practical note: if you're feeding the SR path, expect the output resolution to jump to the SR target (e.g. 720p) - that's the point.
How the decode works
Latents get unscaled (divided by the VAE's scaling factor), and the decoder runs with tiling enabled so full-length video decode fits in memory on consumer cards - the same tiling the loader enables by default. It's the least glamorous node in the graph and also one you'll rarely touch after wiring it up: set it once and it just works.
Installing it
Part of comfyui_hunyuanvideo_1.5_plugin. ComfyUI Manager → search "HunyuanVideo-1.5 nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/yuanyuan-spec/comfyui_hunyuanvideo_1.5_plugin
cd comfyui_hunyuanvideo_1.5_plugin
pip install -r requirements.txt
Restart. The VAE comes from HyVideo15VaeLoader (path "None" auto-downloads).
Common issues
Two things actually bite people here. First, the sr_out wiring: forget to connect it and you'll silently get the base resolution video while the SR branch ran in a corner doing nothing - always check whether your output is SR-res or not when you've built the full graph. Second, shape errors: this node explicitly accepts only 4D or 5D latents and throws a clear error otherwise, which usually means you fed it the wrong node's output (like vae_concat instead of transformer_latent). And if decode OOMs on a long clip, that's the tiling talking - it should be on; if you disabled tile parallelism in the loader, that's your culprit.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| latents | HYVID15TRANSFORMERLATENT | — | |
| output_type | COMBO | pt | 2 options: pt, latent |
| vae | HYVID15VAE | — | |
| hyvid_cfg | HYVID15CFG | — | |
| vae_dtype | COMBO | float16 | 9 options: float32, float64, float16, bfloat16, uint8, int8, +3 |
| sr_outopt | HYVID15SROUT | — | |
| vae_autocast_enabledopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |