HunyuanVideo Encode
The leapfusion image-to-video route
- vae
- image
- samples
This node runs an image through HunyuanVideo's VAE to get a LATENT, which you then feed into HyVideoSampler as either samples (for video-to-video) or image_cond_latents (for image-to-video). That second use is the one worth understanding, because this pack actually offers two different image-to-video routes, and they're easy to mix up.
HyVideoI2VEncode is the official one - it runs your image through the LLM text encoder alongside your prompt, using Tencent's own I2V model. This node, HyVideoEncode, is the older, community-driven route: "leapfusion," a technique that predates the official I2V release and works by encoding an image into a latent and feeding it as a conditioning signal to the base text-to-video model. Two of this node's optional inputs exist specifically for that technique - if you're not doing leapfusion, you probably want HyVideoI2VEncode instead.
The inputs that matter
vae- from HyVideoVAELoader.image- the frame you're encoding.enable_vae_tiling/temporal_tiling_sample_size/spatial_tile_sample_min_size/auto_tile_size- the same tiling controls as HyVideoDecode, with the same caution: leavetemporal_tiling_sample_sizeat 64 (the model default) unless you want stutter.noise_aug_strength(default 0) - the tooltip says it directly: "helpful for leapfusion I2V where some noise can add motion and give sharper results." A pure, noiseless encode of a static image can bias the sampler toward a static output; a little noise gives the model room to introduce motion.latent_strength(default 1) - same context, opposite direction: "helpful for leapfusion I2V where lower values allow for more motion." At 1, the init latent dominates heavily; lower it if your output feels frozen.latent_dist-sample(uses the VAE's latent distribution) ormode(uses its mode).sampleis the default and standard choice.
Output: samples, a LATENT.
How to install it
Ships with the pack - no separate download.
- ComfyUI Manager - search ComfyUI-HunyuanVideoWrapper, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper, thenpip install -r ComfyUI-HunyuanVideoWrapper/requirements.txt, restart.
Needs HyVideoVAELoader working first (manual VAE download from Kijai's HunyuanVideo_comfy repo on HuggingFace - no auto-download).
Common issues & troubleshooting
Output barely moves - it's basically a still image with grain. This is the classic leapfusion symptom, and the fix is right there in the node's own tooltips: raise noise_aug_strength a little, and/or lower latent_strength. Both push the sampler away from over-trusting the static init frame.
Motion is wild and incoherent, image identity is lost. You've likely overcorrected - too much noise_aug_strength or too low a latent_strength gives the model too much freedom to drift from your reference image. Back both toward their defaults and adjust in smaller steps.
Confusing this with HyVideoI2VEncode and getting worse results than expected. If you're not specifically doing the leapfusion technique, use HyVideoI2VEncode instead - it's the official, model-native image-to-video path and generally the better starting point.
Seams or stutter in the encoded result. Same tiling caveats as decode - leave temporal_tiling_sample_size at 64 unless you're deliberately trading quality for VRAM.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| image | IMAGE | — | |
| enable_vae_tiling | BOOLEAN | true | Drastically reduces memory use but may introduce seams |
| temporal_tiling_sample_size | INT | 644–256 | Smaller values use less VRAM, model default is 64, any other value will cause stutter |
| spatial_tile_sample_min_size | INT | 25632–2048 | Spatial tile minimum size in pixels, smaller values use less VRAM, may introduce more seams |
| auto_tile_size | BOOLEAN | true | Automatically set tile size based on defaults, above settings are ignored |
| noise_aug_strengthopt | FLOAT | 0.0000–10 | Strength of noise augmentation, helpful for leapfusion I2V where some noise can add motion and give sharper results |
| latent_strengthopt | FLOAT | 1.0000–10 | Additional latent multiplier, helpful for leapfusion I2V where lower values allow for more motion |
| latent_distopt | COMBO | sample | Sampling mode for the VAE, sample uses the latent distribution, mode uses the mode of the latent distribution |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |