Nodes/HunyuanVideo-1.5 nodes/HunyuanVideo Vae Decode
ComfyUI Node

HunyuanVideo Vae Decode

Turning latents back into the video you actually see

By yuanyuan-spec·Created 10 months ago·Updated 10 months ago· 28
HunyuanVideo Vae Decode
  • latents
  • vae
  • hyvid_cfg
  • sr_out
  • image
output_typept
vae_dtypefloat16
vae_autocast_enabledtrue

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 - HYVID15TRANSFORMERLATENT from HyVideo15Transformer. 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) - pt returns pixel frames; latent skips 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 HYVID15SROUT from HyVidelSrVaeDecoder. 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.

CategoryHunyuanVideoWrapper1.5

Inputs (7)

NameTypeDefaultDescription
latentsHYVID15TRANSFORMERLATENT
output_typeCOMBOpt2 options: pt, latent
vaeHYVID15VAE
hyvid_cfgHYVID15CFG
vae_dtypeCOMBOfloat169 options: float32, float64, float16, bfloat16, uint8, int8, +3
sr_outoptHYVID15SROUT
vae_autocast_enabledoptBOOLEANtrue

Outputs (1)

NameTypeDescription
imageIMAGE