HunyuanVideo Transformer
The heart of the complete workflow — where the denoising actually happens
- hyvid_cfg
- transformer
- vae_concat
- hyvid_embeds
- vision_states
- extra_kwargs
- latents_dict
- transformer_latent
Every other node in the complete HunyuanVideo 1.5 workflow is preparing inputs for this one. HyVideo15Transformer is the sampling core: it takes the noise latents, the text embeddings, the image condition, the vision states, and the glyph extra kwargs, then runs the actual denoising loop - step by step, timestep by timestep - through the 8.3B diffusion transformer until it has a denoised latent video. This is where your video is made. If you're building the complete workflow by hand, this is the node everything funnels into.
What it needs
- transformer - the loaded
HYVID15TRANSFORMERfromHyVideo15TransformerLoader. - hyvid_cfg - from
HyVideo15CFG; supplies the scheduler, guidance scale, seed, and task type. - latents_dict - the noise from
HyVideo15LatentsPrepare. - vae_concat - the image condition from
HyVideo15VaeEncode. - hyvid_embeds - from
HyVideo15TextEncode. - vision_states - from
HyVideo15VisionEncode. - extra_kwargs - from
HyVideo15GlyphByT5(or an empty dict). - n_tokens / steps - n_tokens comes from
HyVideo15LatentsPrepare; steps is your denoising step count (50 for the base model). - target_dtype (bfloat16) - keep it matching the transformer's dtype.
And the settings worth knowing: guidance_rescale (0) applies a rescale to the CFG output - a small value like 0.7 can tame over-saturation if your clips look overcooked. eta (0) is a DDIM-style stochasticity dial, mostly irrelevant for the flow-matching Euler scheduler this pack uses. embedded_guidance_scale (None) passes an additional guidance signal for models that support it; leave it off. And the speed stack: enable_cache with cache_type (deepcache / teacache / taylorcache) plus enable_sageattn - same cached-block tricks as the simplified samplers, needs angelslim==0.2.1 and SageAttention respectively.
Output is transformer_latent (HYVID15TRANSFORMERLATENT), which feeds HyVideo15VaeDecode.
How the loop works
Each step it concatenates the noise latents with the VAE condition, duplicates the batch when CFG is on (positive + negative), runs the transformer to predict the noise, applies the CFG formula (uncond + scale * (text - uncond)), optionally rescales, and takes a scheduler step. It's the standard diffusion loop, wrapped with ComfyUI's progress bar so you can actually watch it cook.
Installing it
Part of comfyui_hunyuanvideo_1.5_plugin. ComfyUI Manager → "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 transformer weights come from HyVideo15TransformerLoader (auto-downloads when path is "None").
Common issues
If you enable enable_cache without angelslim installed, you get an explicit error telling you to pip install angelslim==0.2.1 - it's in the pack's requirements, so a clean install already has it. The more common silent problem is a dtype mismatch between target_dtype and the transformer, which surfaces as a slow, wrong-looking generation rather than a crash. And if your "video" comes out static or pure noise, check hyvid_cfg's task_type against what you fed the encode nodes - a t2v mask on an i2v-conditioned graph produces exactly that.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| hyvid_cfg | HYVID15CFG | — | |
| n_tokens | INT | 11–1000 | — |
| steps | INT | 501–1000 | — |
| transformer | HYVID15TRANSFORMER | — | |
| vae_concat | HYVID15VAECONCAT | — | |
| hyvid_embeds | HYVIDEMBEDS | — | |
| vision_states | HYVID15VISIONSTATES | — | |
| extra_kwargs | HYVID15EXTRAKWARGS | — | |
| latents_dict | HYVID15LATENTSDICT | — | |
| target_dtype | COMBO | bfloat16 | 9 options: float32, float64, float16, bfloat16, uint8, int8, +3 |
| embedded_guidance_scaleopt | FLOAT | Additional control guidance scale, if supported | |
| guidance_rescaleopt | FLOAT | 0.00 | — |
| autocast_enabledopt | BOOLEAN | true | — |
| etaopt | FLOAT | 0.000–1 | — |
| enable_cacheopt | BOOLEAN | false | Enable cache. |
| cache_start_stepopt | INT | 11 | Cache start step. |
| cache_end_stepopt | INT | 45 | Cache end step. |
| no_cache_block_idopt | INT | 53 | No cache block id. |
| cache_step_intervalopt | INT | 4 | Cache step interval. |
| cache_typeopt | COMBO | deepcache | Cache type. |
| enable_sageattnopt | BOOLEAN | false | Enable sageattn. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| transformer_latent | HYVID15TRANSFORMERLATENT | — |