Stack_WanFunInpaintToVideo
First/Last-Frame Video Inpainting on Wan 2.1
- clip_img
- start_image
- end_image
- funInpaint
Wan's "Fun" line splits into a few task-specific variants - Fun Control for driving-video conditioning, and this one, Fun Inpainting, for filling in video content between fixed endpoints rather than generating freely. This node bundles the settings for that model, part of the same official Alibaba Wan 2.1 "Fun" family as Stack_WanFunControlToVideo, a genuinely separate product line from VACE even though both do video-completion-style work.
How it works. You set width, height, and length (frame count, default 81 - the community-standard ~5-second clip at 16fps), then supply start_image and end_image - the model generates the video content between those two fixed frames, rather than freely animating forward from just a starting point the way a plain I2V node would. clip_img and clip_vision_name (defaulting to clip_vision_h.safetensors) handle CLIP vision conditioning on the start image, the same pattern every I2V-family node in this pack uses. The output, funInpaint, feeds a downstream Wan sampler that runs the actual generation.
This is conceptually adjacent to the "last-frame-to-first-frame chaining" trick the Wan community has long used manually to stitch longer clips together - generate a clip, take its last frame, use it as the start of the next clip's generation - except Fun Inpainting is a model purpose-built to fill the middle given both ends fixed, rather than you having to constrain it yourself frame by frame.
Installing it. No special dependency for this node in the base pack: git clone https://github.com/cardenluo/ComfyUI-Apt_Preset into custom_nodes, restart ComfyUI, or search "ComfyUI-Apt_Preset" in ComfyUI Manager. What you actually need beyond the pack itself: the Wan 2.1 Fun Inpainting checkpoint (Alibaba's official release, downloaded separately - this pack doesn't ship model weights), and the CLIP vision model matching clip_vision_name, in models/clip_vision.
Common issues. The most frequent complaint with any start/end-frame video model is the result looking "stretched" or unnatural in the middle when the two endpoints are too dissimilar in pose, framing, or subject scale - the model has to invent a plausible path between them, and a big gap between start and end asks it to invent a lot. Keep your two endpoint images reasonably close in composition if you want smooth, believable motion rather than something that looks like it's forcing a transition. If the video comes back visibly short of your requested length, that's usually Wan's frame-count math - internally the model wants counts landing on a 4n+1 pattern, and requesting an arbitrary number can get silently rounded. And if clip_vision_name's dropdown looks empty, that means the CLIP vision file isn't in models/clip_vision yet - not a graph problem, just a missing download.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_vision_name | COMBO | clip_vision_h.safetensors | 1 options: None |
| width | INT | 83216â4096 | â |
| height | INT | 48016â4096 | â |
| length | INT | 811â4096 | â |
| clip_imgopt | IMAGE | â | |
| start_imageopt | IMAGE | â | |
| end_imageopt | IMAGE | â |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| funInpaint | FUNINPAINT | â |