Nodes/ComfyUI-WanVideoWrapper/Wan Video Prompt Extender Select
ComfyUI Node Runs on cloud

Wan Video Prompt Extender Select

Let an LLM rewrite your terse prompt into what Wan wants

By kijai·Created about a year ago·Updated 2 months ago· 6,651
Wan Video Prompt Extender Select
    • extender_args
    model
    max_new_tokens512
    system_prompt
    custom_system_prompt
    seed0

    Wan responds best to long, specific, cinematic prompts - the KB's rule of thumb is "for image you are a robot taking pictures, for i2v you are George R.R. Martin." Most people type three words and wonder why the motion is boring. This node wires in Wan's official prompt extender: a small LLM that takes your short prompt and rewrites it into the rich, detailed description the model actually wants. Alibaba ships these exact system prompts with Wan; this node just lets you pick one and feed it into the workflow.

    It's a config selector, not the generation itself. You choose which rewriting behavior you want, and it outputs an extender_args bundle that the sampling/encode path uses to run the rewrite at generation time.

    How it works

    You pick an LLM model and one of six built-in system_prompt presets. Each preset is a different rewriting personality tuned for a Wan mode. At generation time the model reads your original prompt through that system prompt and expands it. The presets tell the story of what's on offer:

    • T2V Movie Director (English / Chinese) - for text-to-video: turns a plain idea into a directed, shot-described scene.
    • I2V Rewriter (English / Chinese) - for image-to-video: rewrites your prompt to describe motion applied to an existing image.
    • I2V Imagination (English / Chinese) - a looser I2V mode that invents more, for when you want the model to run with the idea.

    The English/Chinese split is because Wan was trained bilingually and both work; pick the language you prompt in.

    The inputs and outputs that matter

    • model - the LLM used to do the rewriting, from the models it finds on disk. Required.
    • system_prompt - the preset (the six above). This is the real choice: match it to your mode. Using a T2V director prompt on an I2V job gives you a rewrite that describes a scene from scratch instead of describing motion on your image.
    • max_new_tokens (default 512) - how long the rewrite can get. 512 is plenty; raise it only if your expansions are getting cut off.
    • custom_system_prompt (optional STRING) - override the presets entirely with your own instructions. Leave empty to use the selected preset.
    • seed (optional) - the LLM is sampled, so the seed makes a rewrite reproducible. Handy when you found an expansion you liked.

    Output: extender_args (WANVIDEOPROMPTEXTENDER_ARGS) → the matching input on the sampler / text-encode node.

    How to install it

    ComfyUI Manager → search ComfyUI-WanVideoWrapper, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
    pip install -r ComfyUI-WanVideoWrapper/requirements.txt
    

    then restart. The catch: this loads an actual LLM for the rewriting (a Qwen-class model is the usual pick), which has to be downloaded and takes its own VRAM/RAM. On a tight card, running the LLM and Wan back to back can be the thing that tips you into swapping.

    Common issues & troubleshooting

    The rewrite goes off the rails. Wrong preset for your mode is the usual cause - an "Imagination" preset is meant to invent, so it'll add things you didn't ask for. Switch to the plainer "Rewriter" preset, or write a custom_system_prompt that pins down what to keep.

    No change in output. Make sure extender_args is actually wired into the sampler and that the workflow runs the extender before encoding text. If it's dangling, your original short prompt is what gets used.

    It's slow / you OOM. You're loading a second model. If you don't need automatic rewriting, skip the node and just write a long prompt by hand - the extender is a convenience, not a requirement, and a well-written manual prompt beats a mediocre auto-expansion.

    Rewrites change every run. Set seed to lock them once you're happy.

    CategoryWanVideoWrapper

    Inputs (5)

    NameTypeDefaultDescription
    modelCOMBO0 options:
    max_new_tokensINT5121–2048Maximum number of new tokens to generate.
    system_promptCOMBOSystem prompt to use for the model.
    custom_system_promptoptSTRINGCustom system prompt to use instead of the predefined ones.
    seedoptINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    extender_argsWANVIDEOPROMPTEXTENDER_ARGS