Back to wiki Inference

Prompt extension

Wan2.2’s generate.py can rewrite a short prompt — or caption an image — before sampling. Official backends are DashScope Qwen or a local Qwen2.5 / Qwen2.5-VL. This is not LoRA and not a second DiT; it is an LLM pre-pass.

QwenDashScope--use_prompt_extend
On this page 5
Short prompt through Qwen extender into Wan2.2 generate
Official prompt-extension fork: dashscope or local_qwen, then the DiT.

Why the README recommends it

Cinematic labels (light, composition, camera) were part of 2.2’s data work. A three-word prompt under-uses that. Extension fills camera, lighting, and motion so the UMT5 encoder sees a dense caption.

DashScope API

  • Set DASH_API_KEY. International site also needs DASH_API_URL=https://dashscope-intl.aliyuncs.com/api/v1.
  • Default models: qwen-plus for T2V, qwen-vl-max for I2V.
  • Override with --prompt_extend_model. Target language: --prompt_extend_target_lang zh|en.
DashScope + 8 GPU T2V
DASH_API_KEY=your_key torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats…" --use_prompt_extend --prompt_extend_method dashscope --prompt_extend_target_lang zh

Local Qwen

  • T2V: Qwen/Qwen2.5-14B-Instruct, 7B, or 3B depending on leftover VRAM.
  • I2V: Qwen/Qwen2.5-VL-7B-Instruct or 3B.
  • --prompt_extend_method local_qwen and --prompt_extend_model with a HF id or local path.

FAQ

Does extension run every diffusion step?
No. Once, before sampling. Cost is one LLM call, not 50 DiT steps.
Can I skip it?
Yes. All basic README commands work without --use_prompt_extend. Quality is what you lose on short prompts.

Primary sources

Checked against Wan-Video/Wan2.2 README · Aug 28, 2026

© 2026 wan2.video