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

Wan Sampler for Text to Video

Text-to-video on the Wan 2.1-Fun models, with explicit width/height

By aigc-apps·Created 2 years ago·Updated 20 days ago· 2,174
Wan 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

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 - from LoadWanFunModel.
  • prompt / negative_prompt - STRING_PROMPT type, so wire them from FunTextBox, 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) plus teacache_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 a FunRiflex node, 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.

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