Nodes/ComfyUI/WanFunInpaintToVideo
ComfyUI Node Runs on cloud

WanFunInpaintToVideo

Start and end frames, and the model films the middle

By Comfy-Org·Created 4 years ago·Updated about 2 hours ago· 129,964
WanFunInpaintToVideo
  • positive
  • negative
  • vae
  • clip_vision_output
  • start_image
  • end_image
  • positive
  • negative
  • latent
width832
height480
length81
batch_size1

WanFunInpaintToVideo is the Wan 2.2 FunInpaint conditioning node - you give it a start image and an end image, and the model invents a video that moves from one to the other. It's the "animate this photo into that photo" tool, and it's the same family as Wan First Last Frame To Video; the inpaint variant adds CLIP vision conditioning on the start image so the model actually knows what the subject is, not just what the pixels look like.

If your use case is "I have frame A and frame B, generate the transition," this is the node. Character stays the same person because the start image's visual identity is embedded; the video fills in the motion. It's how people make loops, morphs, and "what happens between these two moments" clips on Wan 2.2.

How it works

Under the hood it's honest about its ancestry: WanFunInpaintToVideo's execute method literally calls Wan First Last Frame To Video, passing your start/end images and forwarding the CLIP vision output to the start-image channel. The mechanism: both images get upscaled to your target size, VAE-encoded, and written into the conditioning as a concat_latent_image plus a concat_mask - the mask zeros out the frames the images occupy (plus a few extra) so the model treats them as fixed context and denoises the gap between them.

The inputs that matter:

  • start_image / end_image - the two keyframes. Both optional; give it one and it animates from (or to) that frame with the rest generated.
  • clip_vision_output - from CLIP Vision Encode on your start image. This is the "identity" channel that keeps the subject consistent.
  • width / height / length / batch_size - the canvas. length defaults to 81 frames, Wan's native context.

Outputs: positive, negative, and latent - the empty latent you send to the KSampler, then through the VAE to video.

Where people get burned

  • Skip the CLIP vision input and identity wobbles. The whole point of the FunInpaint variant over plain first/last-frame is the identity conditioning. Wire a CLIP Vision Encode on the start image or the "same person" promise weakens.
  • Matching dimensions. Start/end images are resized to your width/height, but aspect-ratio mismatches still crop oddly. Give it images near your target aspect ratio.
  • It's an 81-frame context model. Longer transitions mean quality drop or looping artifacts. For longer takes, chunk with the extension plumbing or reach for VACE.
  • Forget the sampler and nothing happens. This node produces the latent; you still need the Wan KSampler + VAE decode downstream. People new to video conditioning sometimes stop here and wonder where the clip is.

Ships with ComfyUI core (comfy_extras/nodes_wan.py), needs a Wan 2.2 FunInpaint checkpoint. Compared to the full video-control stack it's refreshingly simple: two frames, one prompt, a clip vision encode, and the model does the directing.

Categorymodel/conditioning/wan/fun inpaint

Inputs (10)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–16384
heightINT48016–16384
lengthINT811–16384
batch_sizeINT11–4096
clip_vision_outputoptCLIP_VISION_OUTPUT
start_imageoptIMAGE
end_imageoptIMAGE

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT