Nodes/VideoX-Fun/Wan 2.2 Fun Sampler for Image to Video
ComfyUI Node

Wan 2.2 Fun Sampler for Image to Video

Start/end-frame video generation on Wan 2.2-Fun

By aigc-apps·Created 2 years ago·Updated 20 days ago· 2,174
Wan 2.2 Fun Sampler for Image to Video
  • funmodels
  • prompt
  • negative_prompt
  • start_img
  • end_img
  • riflex_k
  • images
video_length81
base_resolution640
seed43
steps50
cfg6.00
schedulerFlow
teacache_threshold0.100
enable_teacachetrue
num_skip_start_steps5
teacache_offloadtrue
cfg_skip_ratio0.00

The name is the one genuine trap here: "Inpaint" in this pack doesn't mean masked, photoshop-style inpainting. It means the checkpoint was trained to predict a video given a start frame and an end frame - you tell it where the clip begins and where it should end up, and it fills in the motion between. This node's own display name calls it "Wan 2.2 Fun Sampler for Image to Video," which is the more honest description of what it actually does. It pairs with the -InP checkpoints from LoadWan2_2FunModel.

Start/end-frame prediction is one of the more genuinely useful things this pack offers over stock Wan - it's a real solve for a specific problem: if you know exactly where a shot needs to land (a matched cut, a loop back to the starting pose), telling the model both endpoints directly beats hoping a pure I2V generation drifts there on its own.

How it works

Feed it a funmodels bundle from a -InP checkpoint, a prompt pair, and one or both of a start image and an end image, and it samples a clip constrained to (roughly) begin and end at those frames. Give it only a start image and it behaves like a standard I2V generation; give it both and you get true interpolation between two specified frames.

The inputs that matter

  • funmodels - from LoadWan2_2FunModel (an -InP checkpoint, model_type: Inpaint).
  • prompt / negative_prompt - STRING_PROMPT type; feed from FunTextBox.
  • start_img (optional, IMAGE) - first frame.
  • end_img (optional, IMAGE) - last frame. This is what actually distinguishes this node from a plain I2V sampler - set both and you get genuine two-point interpolation.
  • video_length - default 81, range 5-161, step 4.
  • base_resolution - 512/640/768/896/960/1024, default 640.
  • steps - default 50, up to 200.
  • cfg - default 6, range 1-20.
  • enable_teacache (default true) plus its threshold/offload/skip-steps controls - VideoX-Fun's step-caching, faster at some cost to fine-detail stability across the clip.
  • riflex_k (optional, RIFLEXT_ARGS) - extend past the native frame count via FunRiflex, with the usual caveat that results are inconsistent.

Output: images - a frame batch.

Installing it

Part of the base VideoX-Fun pack. Search ComfyUI Manager for VideoX-Fun; if not indexed, install directly:

cd ComfyUI/custom_nodes
git clone https://github.com/aigc-apps/VideoX-Fun
pip install -r VideoX-Fun/requirements.txt

Restart ComfyUI.

Common issues

Expected a mask input and there isn't one. That's correct - this node has no masking capability at all. "Inpaint" here is purely this pack's name for the start/end-frame training mode. If you want masked video editing, this is the wrong tool; VideoX-Fun doesn't ship that.

Only using start_img, no end_img. Perfectly valid - it just falls back to ordinary I2V behavior. You don't need both connected.

The generated motion between start and end looks off or rushed. This is genuinely sensitive to video_length - too short a window for how much needs to change between the two frames forces the model to compress motion unnaturally. If the transition looks jarring, try a longer video_length before touching anything else.

Wrong checkpoint loaded. This sampler expects an -InP checkpoint with model_type: Inpaint from LoadWan2_2FunModel. Feed it a -Control checkpoint and the conditioning pipeline won't match what the model was trained on - use Wan2_2FunV2VSampler for those instead.

Prompt won't connect. STRING_PROMPT type - needs FunTextBox, not a generic text node.

CategoryCogVideoXFUNWrapper

Inputs (17)

NameTypeDefaultDescription
funmodelsFunModels
promptSTRING_PROMPT
negative_promptSTRING_PROMPT
video_lengthINT815–161
base_resolutionCOMBO6406 options: 512, 640, 768, 896, 960, 1024
seedINT430–18446744073709550000
stepsINT501–200
cfgFLOAT6.001–20
schedulerCOMBOFlow1 options: Flow
teacache_thresholdFLOAT0.1000–1
enable_teacacheCOMBOtrue2 options: false, true
num_skip_start_stepsINT50–50
teacache_offloadCOMBOtrue2 options: false, true
cfg_skip_ratioFLOAT0.000–1
start_imgoptIMAGE
end_imgoptIMAGE
riflex_koptRIFLEXT_ARGS

Outputs (1)

NameTypeDescription
imagesIMAGE