Nodes/WanImageToVideoTiledVAE for ComfyUI/WanFirstLastFrameToVideo (Tiled VAE encode)
ComfyUI Node

WanFirstLastFrameToVideo (Tiled VAE encode)

Animate between two frames — with a tiled VAE encode so it fits

By stduhpf·Created about a year ago·Updated 10 months ago· 16
WanFirstLastFrameToVideo (Tiled VAE encode)
  • positive
  • negative
  • vae
  • clip_vision_start_image
  • clip_vision_end_image
  • start_image
  • end_image
  • positive
  • negative
  • latent
width832
height480
length81
batch_size1
tile_size512
overlap64
temporal_size64
temporal_overlap8

Want a clip that starts on one image and ends on a different one, with Wan filling in everything in between? That's the core WanFirstLastFrameToVideo node, and WanFirstLastFrameToVideo (Tiled VAE encode) is its drop-in replacement with the VAE encode run in tiles. Same conditioning, same latent - just lower peak VRAM during the encode, which is the whole point of this pack.

How it works

The node builds one big image tensor: your start_image in the front frames, your end_image in the back frames, and neutral gray (0.5) in between. A matching concat_mask tells the model which frames are locked in and which it gets to invent. That combined tensor is what gets encoded - in this pack via vae.encode_tiled(), splitting the work into spatial tiles and temporal frame-chunks instead of one monolithic encode. The mask is built at pixel resolution and downsampled to latent resolution, so the locked frames stay locked.

There's a neat extra: clip_vision_start_image and clip_vision_end_image are separate from the pixel images. If you feed both, the node concatenates their CLIP Vision hidden states so the model "sees" both endpoints, which is how the interpolation knows what the beginning and end should look like.

Inputs and outputs

The four inputs a beginner actually touches:

  • start_image and end_image - your two keyframes. Both optional individually, but you want at least one; feed both for a proper first-frame-to-last-frame interpolation.
  • clip_vision_start_image / clip_vision_end_image - CLIP Vision outputs for each endpoint (from a CLIP Vision loader). Feed both for best results.
  • Plus the usual width / height / length / batch_size and the four tiling knobs tile_size / overlap / temporal_size / temporal_overlap.

Outputs are the standard positive, negative, latent - sampler conditioning on the first two, samples from the third.

Install

Same as every node in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/stduhpf/ComfyUI--WanImageToVideoTiled

or via ComfyUI Manager (search "WanImageToVideoTiled"), then restart. No extra dependencies or model files - it rides on your existing Wan VAE and ComfyUI's core Wan helpers.

What to watch for

The author marks this one as tested, which is more than half the pack can say. Two caveats carry over from the others: tiling only shrinks the encode stage, and you want VAE Decode (Tiled) at the end since decode is usually the slowest part of a Wan render. On quality, tiling is theoretically a touch worse at tile boundaries; the author reports no visible difference in practice, and overlap is the knob to raise if you ever see seams. One honest limitation to set expectations: this gives you a guided interpolation, not a morphing effect - Wan decides what "between" means, and it'll happily invent plausible motion rather than warp the two frames together.

Categoryconditioning/video_models

Inputs (15)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–16384
heightINT48016–16384
lengthINT811–16384
batch_sizeINT11–4096
tile_sizeINT51264–4096
overlapINT640–4096
temporal_sizeINT648–4096Amount of frames to encode at a time.
temporal_overlapINT84–4096Amount of frames to overlap.
clip_vision_start_imageoptCLIP_VISION_OUTPUT
clip_vision_end_imageoptCLIP_VISION_OUTPUT
start_imageoptIMAGE
end_imageoptIMAGE

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT