You're welcome to visit our GitHub repository for the latest model releases or to reproduce our results.
We are excited to release the distilled version of Wan2.2 video generation model family, which offers the following advantages:
| Model | Type | For Native Comfy | For Kijai's Wrapper |
|---|---|---|---|
| Wan2.2-I2V-A14B-NFE4-V1 | Image-to-Video | I2V-V1-WF | I2V-V1-WF |
| Wan2.2-T2V-A14B-NFE4-V1.1 | Text-to-Video | T2V-V1.1-WF | T2V-V1.1-WF |
The videos below can be reproduced using examples/i2v_prompt_list.txt and examples/i2v_image_path_list.txt.
The videos below can be reproduced using examples/prompt_list.txt.
When the video contains elements with extremely large motion, the generated results may include artifacts. In some results, the direction of the vehicles may be reversed.
Please follow Wan2.2 Official Github to install the Python Environment and download the Base Model.
Download models using huggingface-cli:
pip install "huggingface_hub[cli]"
huggingface-cli download Wan-AI/Wan2.2-T2V-A14B --local-dir ./Wan2.2-T2V-A14B
huggingface-cli download lightx2v/Wan2.2-Lightning --local-dir ./Wan2.2-Lightning
This repository supports the Wan2.2-T2V-A14B Text-to-Video model and can simultaneously support video generation at 480P and 720P resolutions, either portrait or landscape.
To facilitate implementation, we will start with a basic version of the inference process that skips the prompt extension step.
python generate.py --task t2v-A14B --size "1280*720" --ckpt_dir ./Wan2.2-T2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1 --offload_model True --base_seed 42 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
python generate.py --task t2v-A14B --size "1280*720" --ckpt_dir ./Wan2.2-T2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1 --offload_model True --base_seed 42 --prompt_file examples/prompt_list.txt
💡 This command can run on a GPU with at least 80GB VRAM.
💡If you encounter OOM (Out-of-Memory) issues, you can use the
--offload_model True,--convert_model_dtypeand--t5_cpuoptions to reduce GPU memory usage.
Multi-GPU inference using FSDP + DeepSpeed Ulysses
We use PyTorch FSDP and DeepSpeed Ulysses to accelerate inference.
torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size "1280*720" --ckpt_dir ./Wan2.2-T2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1 --dit_fsdp --t5_fsdp --ulysses_size 8 --base_seed 42 --prompt_file examples/prompt_list.txt
Extending the prompts can effectively enrich the details in the generated videos, further enhancing the video quality. Therefore, we recommend enabling prompt extension. We provide the following two methods for prompt extension:
dashscope.api_key in advance (EN | CN).DASH_API_KEY to specify the Dashscope API key. For users of Alibaba Cloud's international site, you also need to set the environment variable DASH_API_URL to 'https://dashscope-intl.aliyuncs.com/api/v1'. For more detailed instructions, please refer to the dashscope document.qwen-plus model for text-to-video tasks and qwen-vl-max for image-to-video tasks.--prompt_extend_model. For example:DASH_API_KEY=your_key torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1 --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage" --use_prompt_extend --prompt_extend_method 'dashscope' --prompt_extend_target_lang 'zh'
Using a local model for extension.
Qwen/Qwen2.5-14B-Instruct, Qwen/Qwen2.5-7B-Instruct and Qwen/Qwen2.5-3B-Instruct.Qwen/Qwen2.5-VL-7B-Instruct and Qwen/Qwen2.5-VL-3B-Instruct.--prompt_extend_model , allowing you to specify either a local model path or a Hugging Face model. For example:torchrun --nproc_per_node=8 generate.py --task t2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-T2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1 --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage" --use_prompt_extend --prompt_extend_method 'local_qwen' --prompt_extend_target_lang 'zh'
This repository supports the Wan2.2-I2V-A14B Image-to-Video model and can simultaneously support video generation at 480P and 720P resolutions.
python generate.py --task i2v-A14B --size "1280*720" --ckpt_dir ./Wan2.2-I2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1 --offload_model True --base_seed 42 --prompt_file examples/i2v_prompt_list.txt --image_path_file examples/i2v_image_path_list.txt
This command can run on a GPU with at least 80GB VRAM.
💡For the Image-to-Video task, the
sizeparameter represents the area of the generated video, with the aspect ratio following that of the original input image.
torchrun --nproc_per_node=8 generate.py --task i2v-A14B --size 1280*720 --ckpt_dir ./Wan2.2-I2V-A14B --lora_dir ./Wan2.2-Lightning/Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1 --dit_fsdp --t5_fsdp --ulysses_size 8 --base_seed 42 --prompt_file examples/i2v_prompt_list.txt --image_path_file examples/i2v_image_path_list.txt
The models in this repository are licensed under the Apache 2.0 License. We claim no rights over the your generated contents, granting you the freedom to use them while ensuring that your usage complies with the provisions of this license. You are fully accountable for your use of the models, which must not involve sharing any content that violates applicable laws, causes harm to individuals or groups, disseminates personal information intended for harm, spreads misinformation, or targets vulnerable populations. For a complete list of restrictions and details regarding your rights, please refer to the full text of the license.
We built upon and reused code from the following projects: Wan2.1, Wan2.2, licensed under the Apache License 2.0.
We also adopt the evaluation text prompts from Movie Gen Bench, which is licensed under the Creative Commons Attribution-NonCommercial 4.0 (CC BY-NC 4.0) License. The original license can be found here.
The selected prompts are further enhanced using the Qwen/Qwen2.5-14B-Instructmodel Qwen.