Nodes/HunyuanVideo-1.5 nodes/HunyuanVideo Transformer
ComfyUI Node

HunyuanVideo Transformer

The heart of the complete workflow — where the denoising actually happens

By yuanyuan-spec·Created 10 months ago·Updated 10 months ago· 28
HunyuanVideo Transformer
  • hyvid_cfg
  • transformer
  • vae_concat
  • hyvid_embeds
  • vision_states
  • extra_kwargs
  • latents_dict
  • transformer_latent
n_tokens1
steps50
target_dtypebfloat16
embedded_guidance_scale
guidance_rescale0.00
autocast_enabledtrue
eta0.00
enable_cachefalse
cache_start_step11
cache_end_step45
no_cache_block_id53
cache_step_interval4
cache_typedeepcache
enable_sageattnfalse

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 HYVID15TRANSFORMER from HyVideo15TransformerLoader.
  • 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.

CategoryHunyuanVideoWrapper1.5

Inputs (21)

NameTypeDefaultDescription
hyvid_cfgHYVID15CFG
n_tokensINT11–1000
stepsINT501–1000
transformerHYVID15TRANSFORMER
vae_concatHYVID15VAECONCAT
hyvid_embedsHYVIDEMBEDS
vision_statesHYVID15VISIONSTATES
extra_kwargsHYVID15EXTRAKWARGS
latents_dictHYVID15LATENTSDICT
target_dtypeCOMBObfloat169 options: float32, float64, float16, bfloat16, uint8, int8, +3
embedded_guidance_scaleoptFLOATAdditional control guidance scale, if supported
guidance_rescaleoptFLOAT0.00
autocast_enabledoptBOOLEANtrue
etaoptFLOAT0.000–1
enable_cacheoptBOOLEANfalseEnable cache.
cache_start_stepoptINT11Cache start step.
cache_end_stepoptINT45Cache end step.
no_cache_block_idoptINT53No cache block id.
cache_step_intervaloptINT4Cache step interval.
cache_typeoptCOMBOdeepcacheCache type.
enable_sageattnoptBOOLEANfalseEnable sageattn.

Outputs (1)

NameTypeDescription
transformer_latentHYVID15TRANSFORMERLATENT