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

Wan Fun Sampler for Text to Video

VideoX-Fun's Wan 2.1-Fun node

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

This is the node that actually runs a generation: text prompt in, video out, built specifically for the Wan2.1-Fun family of checkpoints (Wan2.1-Fun-1.3B-InP, Wan2.1-Fun-14B-InP, and the V1.1 updates). If you've loaded a Wan-Fun model via LoadWanModel - optionally passed through LoadWanLora first - this is where the prompt turns into pixels.

What "Fun" actually means here

Alibaba PAI's "Fun" line isn't a vibe, it's a release track: alongside the base Wan checkpoints Alibaba's Wan-AI team ships, the PAI (Platform for AI) team publishes parallel "Fun" versions with extra capabilities layered in - start/end-frame prediction, control conditioning, reference images, camera control. This node is built for that track specifically. If you loaded a base (non-Fun) Wan 2.1 checkpoint, it'll still technically run, but you're leaving the Fun-specific training on the table.

The prompt and resolution fields

prompt and negative_prompt are plain text - Wan wants prose, not tag soup, and crucially it wants a different kind of prose depending on what you're describing. The community's hard-won rule: describe a still image flatly and technically (think "captioning a LoRA dataset," not "breathtaking, masterpiece"), then describe the motion separately and simply. Don't restate the image in the motion description; just say what moves.

width and height default to 832x480 - Wan's standard low-res working resolution, in steps of 16. video_length defaults to 81, going up to 161, in steps of 4. That step isn't cosmetic: Wan's VAE compresses time roughly 4x, so valid frame counts follow a 4n+1 pattern (81, 121, 161...) - pick anything off that grid and the node rounds you back onto it anyway.

is_image is a nice side door: flip it true and you get a single still frame instead of a clip. Wan's single-frame output is surprisingly strong as a straight text-to-image generator - the community discovered this by accident and kept using it, on the theory that training on video gives the model a better sense of 3D space and physical plausibility than a pure image model picks up.

Sampling settings

steps defaults to 50, cfg to 6, scheduler only offers Flow (Wan is a flow-matching model, so there's nothing else to pick - the dropdown exists but there's no real decision here). seed is the usual.

The TeaCache block (enable_teacache, teacache_threshold, num_skip_start_steps, teacache_offload) is a speed lever: TeaCache notices when a denoising step is close enough to a previous one and skips the redundant computation. Real speedup, minor quality cost - and the specific cost people report most is face consistency degrading slightly, so if faces are the point of your generation, try disabling it first and see if the extra time is worth it. num_skip_start_steps (default 5) protects the first few steps from caching, since those set up the overall structure and are the steps you least want to shortcut. teacache_offload keeps the cached tensors off the GPU to save VRAM. cfg_skip_ratio is a related speed knob - it skips computing the negative-prompt branch on a portion of steps - worth a try if you're squeezed for time, at some cost to prompt adherence.

riflex_k (optional) hooks into RIFLEx, a technique for pushing past Wan's native frame ceiling by adjusting the model's positional encoding. Set expectations low: community reports are genuinely mixed, with plenty of people seeing no difference on complex scenes and some success on simple, repetitive motion where nothing leaves frame. It's not a reliable unlimited-length button.

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. Download the matching Wan2.1-Fun checkpoint from the README's model zoo and drop the whole diffusers-format folder under ComfyUI/models/Fun_Models/ - 19GB for the 1.3B tier, 47GB for 14B.

Common issues

Out-of-memory on 14B is the most common failure, fixed by setting GPU_memory_mode correctly back at LoadWanModel, not here. Blurry or repetitive motion past 81 frames without riflex_k set is expected, not a bug - that's the native ceiling. And if your output ignores half your prompt, check you're not writing one long descriptive sentence covering both the image and the motion - split them, per the prompting note above; it's the single biggest quality lever on this node that isn't a slider.

CategoryCogVideoXFUNWrapper

Inputs (17)

NameTypeDefaultDescription
funmodelsFunModels
promptSTRING_PROMPT
negative_promptSTRING_PROMPT
video_lengthINT815–161
widthINT83264–2048
heightINT48064–2048
is_imageCOMBOfalse2 options: false, true
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
riflex_koptRIFLEXT_ARGS

Outputs (1)

NameTypeDescription
imagesIMAGE