Wan Sampler for Text to Video
Text-to-video on the Wan 2.1-Fun models, with explicit width/height
- funmodels
- prompt
- negative_prompt
- riflex_k
- images
The pure text-to-video sampler for the Wan 2.1-Fun family loaded through LoadWanFunModel. It's worth noticing what's different about this node next to WanI2VSampler: instead of a base_resolution enum picking from a fixed list, you get explicit width and height sliders. That's not a UI inconsistency - it reflects how the README's own predict_t2v.py script works for this family: T2V generation sets resolution directly rather than snapping to one of a handful of presets tuned around an input image's aspect ratio.
How it works
Feed it a loaded funmodels, a prompt pair, pick your resolution and frame count, and it runs flow-matching sampling from pure noise - no starting image involved, unlike the I2V nodes in this pack. Output is a frame batch (images).
The inputs that matter
funmodels- fromLoadWanFunModel.prompt/negative_prompt-STRING_PROMPTtype, so wire them fromFunTextBox, not a plain text box.video_length- default 81, range 5-161, step 4.width- default 832, range 64-2048, step 16.height- default 480, range 64-2048, step 16. Default 832×480 is Wan's standard 480p landscape frame.is_image- default false. Set true and it generates a single still frame instead of a clip - Wan's video training gives it surprisingly strong text-to-image chops as a side effect, which the wider community has separately documented as genuinely competitive with dedicated image models.steps- default 50, up to 200.cfg- default 6, range 1-20.enable_teacache(default true) plusteacache_threshold,num_skip_start_steps,teacache_offload- the same caching setup as the I2V samplers, trading some fine-detail consistency for meaningfully faster sampling.riflex_k(optional, RIFLEXT_ARGS) - from aFunRiflexnode, for pushing past the native frame ceiling.
Output: images.
Installing it
Part of the base VideoX-Fun install. Search ComfyUI Manager for VideoX-Fun; if it's not indexed there:
cd ComfyUI/custom_nodes
git clone https://github.com/aigc-apps/VideoX-Fun
pip install -r VideoX-Fun/requirements.txt
Restart ComfyUI.
Common issues
Prompting for T2V feels like it's not landing. The community's practical advice for Wan T2V prompting is to write flatly and technically, almost like captioning a training image, rather than reaching for evocative adjectives - "beautiful" and "breathtaking" tend to actively hurt prompt adherence on this model family compared to plain, concrete description.
Width/height rejected or generation errors. Both need to stay in step-16 increments within 64-2048 - arbitrary values outside that grid won't be accepted.
Trying is_image: true and getting an unexpected result. That's the intended behavior - this flips the node into single-frame generation rather than a clip. It's genuinely useful as a fast text-to-image mode using the same model and prompt pipeline, not a bug.
Prompt/negative prompt inputs won't connect. They're STRING_PROMPT, a custom type - plug in FunTextBox, not ComfyUI's default multiline text widget.
Generation is slow at high steps and resolution. This is a 14B-class model at up to 200 steps and 2048px - expect it to be heavy. Lower steps for iteration, keep enable_teacache on, and only push resolution up once your prompt and settings are dialed in.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| funmodels | FunModels | — | |
| prompt | STRING_PROMPT | — | |
| negative_prompt | STRING_PROMPT | — | |
| video_length | INT | 815–161 | — |
| width | INT | 83264–2048 | — |
| height | INT | 48064–2048 | — |
| is_image | COMBO | false | 2 options: false, true |
| 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 | — |
| riflex_kopt | RIFLEXT_ARGS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |