Wan Fun Sampler for Image to Video
Start/end-frame video generation
- funmodels
- prompt
- negative_prompt
- start_img
- end_img
- riflex_k
- images
The class name says "Inpaint," the display name says "Image to Video," and both are correct - they're just describing the same trick from two angles. This is VideoX-Fun's I2V node: feed it a starting frame and it animates forward from there, the mode the Wan community treats as the default over pure text-to-video because anchoring to a real image solves most of the consistency problems T2V struggles with. It maps to the -InP checkpoints in the README's model zoo (Wan2.1-Fun-14B-InP, Wan2.1-Fun-V1.1-1.3B-InP, and so on) - "InP" is literally short for "Inpaint," which is also the mechanism: internally, the model treats the frames between your start (and optional end) image as a video-inpainting problem, filling in what's missing.
The part that makes this node worth knowing about
Most I2V tools give you a start image and nothing else. This one takes an optional end_img too - set both start_img and end_img, and the model generates the motion that connects them: first-frame/last-frame video generation, not just "animate from here." That's a genuinely useful capability if you want a clip that lands somewhere specific rather than just wandering off from a starting point. Leave end_img empty and it behaves like standard I2V, generating outward from start_img alone with no destination constraint.
Both image inputs are optional in the schema, which also means you can run this node with neither set - at that point it's functioning closer to a T2V generation off the same underlying Fun-InP checkpoint, though if that's your goal, WanFunT2VSampler is the more direct tool.
Resolution works differently here
Instead of literal width/height, this node uses base_resolution - a bucket picker (512, 640, 768, 896, 960, or 1024, default 640). Rather than you specifying exact output dimensions, the pipeline fits your generation to your input image's aspect ratio, scaled to land around whatever bucket you pick. If your start image is portrait, you'll get a portrait output sized around your chosen bucket, not a square one. This matches the README's own framing of these models supporting "multi-resolution (512, 768, 1024) video prediction" - the bucket is the resolution tier, not a literal pixel dimension.
The rest of the fields
prompt / negative_prompt - same rule as everywhere else in this pack: describe the motion, not the image (the image is already doing that job). video_length runs 5-161 in steps of 4, matching the 4n+1 frame-count pattern the Wan VAE requires. steps defaults to 50, cfg to 6, scheduler is fixed to Flow.
TeaCache (enable_teacache, teacache_threshold, num_skip_start_steps, teacache_offload) trades a bit of quality - most noticeably face consistency - for real speed; disable it if your generation is a close-up. cfg_skip_ratio is a related speed lever that skips negative-prompt computation on a portion of steps. riflex_k (optional) is RIFLEx, for pushing past the native frame ceiling - treat it as "sometimes helps on simple motion," not a guaranteed fix, per community reports.
Output is images - the generated clip as a frame batch.
Installing VideoX-Fun
ComfyUI Manager: search "VideoX-Fun" (or "CogVideoX-Fun"). Manual: cd ComfyUI/custom_nodes && git clone https://github.com/aigc-apps/VideoX-Fun, restart. Grab an -InP checkpoint from the README's model zoo - 19GB (1.3B) or 47GB (14B) - and place the full diffusers folder under ComfyUI/models/Fun_Models/.
Common issues
The biggest one is subtle: if you set end_img and the result looks like it's fighting to get there - awkward, unnatural motion in the last few frames - that's usually the model straining to hit a destination that's too different from the start (a big pose change, a totally different scene) inside too few frames. Give it more video_length or pick start/end frames that are closer to each other in composition. Beyond that, the same VRAM and frame-quantization issues apply as the rest of this pack: 14B without the right GPU_memory_mode back at LoadWanModel will OOM, and video_length values off the 4n+1 grid get silently rounded rather than erroring.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| funmodels | FunModels | — | |
| prompt | STRING_PROMPT | — | |
| negative_prompt | STRING_PROMPT | — | |
| video_length | INT | 815–161 | — |
| base_resolution | COMBO | 640 | 6 options: 512, 640, 768, 896, 960, 1024 |
| seed | INT | 430–18446744073709550000 | — |
| steps | INT | 501–200 | — |
| cfg | FLOAT | 6.001–20 | — |
| scheduler | COMBO | Flow | 1 options: Flow |
| teacache_threshold | FLOAT | 0.1000–1 | — |
| enable_teacache | COMBO | true | 2 options: false, true |
| num_skip_start_steps | INT | 50–50 | — |
| teacache_offload | COMBO | true | 2 options: false, true |
| cfg_skip_ratio | FLOAT | 0.000–1 | — |
| start_imgopt | IMAGE | — | |
| end_imgopt | IMAGE | — | |
| riflex_kopt | RIFLEXT_ARGS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |