Nodes/ComfyUI-WanVideoWrapper/WanVideo ImageToVideo Encode
ComfyUI Node Runs on cloud

WanVideo ImageToVideo Encode

The I2V starting point, and how to add an end frame

By kijai·Created about a year ago·Updated 2 months ago· 6,651
WanVideo ImageToVideo Encode
  • vae
  • clip_embeds
  • start_image
  • end_image
  • control_embeds
  • temporal_mask
  • extra_latents
  • add_cond_latents
  • empty_frame_pad_image
  • image_embeds
width832
height480
num_frames81
noise_aug_strength0.000
start_latent_strength1.000
end_latent_strength1.000
force_offloadtrue
fun_or_fl2v_modeltrue
tiled_vaefalse
augment_empty_frames0.00

Image-to-video is the workflow most people actually want from Wan, and this is the node that sets it up. You give it a starting image (and optionally an ending image), a resolution, and a frame count, and it produces the WANVIDIMAGE_EMBEDS that the sampler denoises into a moving clip. Anchoring the first frame to a real image is why I2V is the community default - it sidesteps most of the consistency problems that plague pure text-to-video.

How it works

The node encodes your start image into the latent space Wan generates in, and builds the image-conditioning embeds that tell the sampler "begin here and animate forward." Feed it an end image too and you get first-frame/last-frame (FLF) control - the model interpolates a plausible motion path from your start to your target. Under the hood it uses the Wan VAE to encode the image latents and packages everything the sampler needs.

The inputs that matter

  • start_image (optional but the whole point) - your first frame. A strong, clean still here does more for output quality than any parameter on the node.
  • end_image (optional) - the target last frame for FLF. Leave it empty for open-ended forward animation; wire it in when you want the clip to arrive at a specific pose or composition.
  • width / height - output resolution. 832×480 (the default) and 1280×720 are the standard Wan sizes. Higher costs a lot more memory and time.
  • num_frames - clip length in frames, stepping by 4 (the VAE's temporal stride). 81 is the native default - roughly 5 seconds at 16fps. Go much past 81 and Wan starts to loop or wobble without extra help.
  • vae - the WANVAE, required to encode the image.
  • noise_aug_strength / start_latent_strength / end_latent_strength - fine controls over how strongly the start/end latents constrain the generation. Defaults are fine to start; ease start_latent_strength down slightly if the first frame feels "stuck" and the motion is too timid.

Output is a WANVIDIMAGE_EMBEDS that plugs into the sampler's image_embeds input.

How to install it

Ships with the pack. Via ComfyUI Manager: search WanVideo Wrapper, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart. You'll need the Wan VAE in models/vae for the vae input.

Common issues & troubleshooting

The subject barely moves. Two usual causes: the motion prompt is over-describing the static image (describe only the action), or the latent strengths are pinning the start frame too hard. Also check you're not fighting a speed LoRA that's flattening motion.

FLF produces a weird morph between start and end. The bigger the gap between your start and end images, the more the model has to invent, and invention is where it gets strange. Keep the two frames related - same subject, same framing - and the interpolation stays clean.

Longer than 81 frames looks bad. This node will happily accept a big num_frames, but the model's native context is 81. For genuinely long clips, use context options or a dedicated extension path rather than just cranking the number here.

Frame count comes back short by a couple frames. That's the VAE's 4x temporal compression (the 4n+1 quirk). Use frame counts on the 4n+1 grid (77, 81, …) to get exactly what you asked for.

CategoryWanVideoWrapper

Inputs (19)

NameTypeDefaultDescription
widthINT83264–8096Width of the image to encode
heightINT48064–8096Height of the image to encode
num_framesINT811–10000Number of frames to encode
noise_aug_strengthFLOAT0.0000–10Strength of noise augmentation, helpful for I2V where some noise can add motion and give sharper results
start_latent_strengthFLOAT1.0000–10Additional latent multiplier, helpful for I2V where lower values allow for more motion
end_latent_strengthFLOAT1.0000–10Additional latent multiplier, helpful for I2V where lower values allow for more motion
force_offloadBOOLEANtrue
vaeoptWANVAE
clip_embedsoptWANVIDIMAGE_CLIPEMBEDSClip vision encoded image
start_imageoptIMAGEImage to encode
end_imageoptIMAGEend frame
control_embedsoptWANVIDIMAGE_EMBEDSControl signal for the Fun -model
fun_or_fl2v_modeloptBOOLEANtrueEnable when using official FLF2V or Fun model
temporal_maskoptMASKmask
extra_latentsoptLATENTExtra latents to add to the input front, used for Skyreels A2 reference images
tiled_vaeoptBOOLEANfalseUse tiled VAE encoding for reduced memory use
add_cond_latentsoptADD_COND_LATENTSAdditional cond latents WIP
augment_empty_framesoptFLOAT0.000–10EXPERIMENTAL: Augment empty frames with the difference to the start image to force more motion
empty_frame_pad_imageoptIMAGEUse this image to pad empty frames instead of gray, used with SVI-shot and SVI 2.0 LoRAs

Outputs (1)

NameTypeDescription
image_embedsWANVIDIMAGE_EMBEDS