💜 Wan | 🖥️ GitHub | 🤗 Hugging Face | 🤖 ModelScope | 📑 技术报告 | 📑 博客 | 💬 微信群 | 📖 Discord
我们隆重推出Wan2.2——基础视频模型的重大升级版本。本次升级聚焦以下创新突破:
👍 高效混合专家架构:首次将MoE架构引入视频扩散模型,通过分时步专家模型协同降噪,在计算成本不变的情况下实现模型容量跃升。
👍 电影级美学控制:注入经专业标注的美学数据,涵盖光影、构图、对比度、色调等维度标签,实现精准可控的影视级风格化生成。
👍 复杂运动建模:相较Wan2.1,训练数据规模提升65.6%(图像)与83.2%(视频),在运动规律、语义理解、美学表现等维度实现全面泛化,综合性能领跑开源/闭源模型。
👍 高效高清混合生成:开源5B参数模型搭载自研Wan2.2-VAE(压缩比达16×16×4),支持720P@24fps文生视频/图生视频,单卡4090可运行,是目前最快的720P@24fps级模型之一,工业级与学术需求兼得。
本仓库包含采用Wan2.2-VAE(16×16×4压缩比)构建的TI2V-5B模型,支持720P@24fps文生视频/图生视频,单张消费级显卡(如4090)即可运行。作为当前最快的720P@24fps级模型之一,可同时满足工业应用与学术研究需求。
若您的研究或项目基于Wan2.1或Wan2.2构建,欢迎联系我们将其展示给更广泛的社区。
克隆代码仓库:
git clone https://github.com/Wan-Video/Wan2.2.git
cd Wan2.2安装依赖项:
# Ensure torch >= 2.4.0
pip install -r requirements.txt| 模型名称 | 下载链接 | 描述说明 |
|---|---|---|
| T2V-A14B | 🤗 Huggingface 🤖 ModelScope | 文本生成视频混合专家模型,支持480P & 720P |
| I2V-A14B | 🤗 Huggingface 🤖 ModelScope | 图像生成视频混合专家模型,支持480P & 720P |
| TI2V-5B | 🤗 Huggingface 🤖 ModelScope | 高压缩率VAE,支持文本/图像生成视频,支持720P |
💡注意事项:
TI2V-5B模型支持24帧/秒的720P视频生成。
使用huggingface-cli下载模型:
pip install "huggingface_hub[cli]"
huggingface-cli download Wan-AI/Wan2.2-TI2V-5B --local-dir ./Wan2.2-TI2V-5B使用 modelscope-cli 下载模型:
pip install modelscope
modelscope download Wan-AI/Wan2.2-TI2V-5B --local_dir ./Wan2.2-TI2V-5B本仓库支持 Wan2.2-TI2V-5B 文本-图像到视频模型,可实现720P分辨率下的视频生成。
python generate.py --task ti2v-5B --size 1280*704 --ckpt_dir ./Wan2.2-TI2V-5B --offload_model True --convert_model_dtype --t5_cpu --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage"💡与其他任务不同,文本/图像生成视频任务的720P分辨率为
1280*704或704*1280。
该命令可在显存至少为24GB的GPU上运行(例如RTX 4090显卡)。
💡若使用显存≥80GB的GPU运行,可移除
--offload_model True、--convert_model_dtype及--t5_cpu参数以加速执行。
python generate.py --task ti2v-5B --size 1280*704 --ckpt_dir ./Wan2.2-TI2V-5B --offload_model True --convert_model_dtype --t5_cpu --image examples/i2v_input.JPG --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."💡若配置了图像参数,则执行图像生成视频任务;否则默认进行文本生成视频任务。
💡与图像生成视频类似,
size参数代表生成视频的尺寸区域,其宽高比将遵循原始输入图像的比例。
torchrun --nproc_per_node=8 generate.py --task ti2v-5B --size 1280*704 --ckpt_dir ./Wan2.2-TI2V-5B --dit_fsdp --t5_fsdp --ulysses_size 8 --image examples/i2v_input.JPG --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."提示词扩展流程可参考此处。
我们在下表中测试了不同Wan2.2模型在不同GPU上的计算效率。结果以**总耗时(秒)/峰值GPU显存(GB)**的格式呈现。
本表测试的参数设置如下: (1) 多GPU:14B模型使用
--ulysses_size 4/8 --dit_fsdp --t5_fsdp,5B模型使用--ulysses_size 4/8 --offload_model True --convert_model_dtype --t5_cpu;单GPU:14B模型使用--offload_model True --convert_model_dtype,5B模型使用--offload_model True --convert_model_dtype --t5_cpu(--convert_model_dtype将模型参数类型转换为config.param_dtype); (2) 分布式测试采用内置FSDP和Ulysses实现,Hopper架构GPU部署了FlashAttention3; (3) 测试未启用--use_prompt_extend标志; (4) 报告结果为预热阶段后多次采样的平均值。
Wan2.2在Wan2.1基础上实现了生成质量和模型能力的显著提升。这一升级源于系列关键技术革新,主要包括混合专家架构(MoE)、升级版训练数据和高压缩视频生成。
Wan2.2将混合专家架构引入视频生成扩散模型。MoE在大型语言模型中已被广泛验证,能在保持推理成本几乎不变的情况下增加模型总参数量。Wan2.2的A14B模型系列采用双专家设计:高噪声专家负责早期去噪阶段,专注整体布局;低噪声专家处理后期阶段,精修视频细节。每个专家模型约14B参数,总参数量达27B但每步仅激活14B参数,推理计算量和GPU显存基本不变。
专家切换点由信噪比(SNR)决定,该指标随去噪步数增加单调递减。去噪初期值大、噪声水平高,此时SNR处于最小值,激活高噪声专家。我们设定阈值步数对应的一半,当时切换至低噪声专家。
为验证MoE架构有效性,我们对比了四种设置的验证损失曲线。基线模型Wan2.1未采用MoE架构。在MoE变体中,Wan2.1 & 高噪声专家复用Wan2.1作为低噪声专家,Wan2.1 & 低噪声专家则复用其作为高噪声专家。最终版**Wan2.2 (MoE)**取得最低验证损失,表明其生成视频分布最接近真实数据且收敛性最优。
为实现高效部署,Wan2.2还探索了高压缩设计。除27B MoE模型外,同步发布5B稠密模型TI2V-5B。该模型搭载高压缩Wan2.2-VAE,实现维度的压缩比,整体压缩率达64倍同时保持高质量视频重建。通过新增分块层,TI2V-5B总压缩比达。未经特殊优化时,单张消费级GPU可在9分钟内生成5秒720P视频,位列最快720P@24fps视频生成模型梯队。该模型还原生支持文本生成视频与图像生成视频双任务统一框架,兼顾学术研究与实践应用。
我们在新版Wan-Bench 2.0上对比了Wan2.2与领先闭源商业模型,从多个关键维度评估性能。结果表明Wan2.2相较这些领先模型展现出更优性能。
若您认为我们的工作有帮助,请引用我们。
@article{wan2025,
title={Wan: Open and Advanced Large-Scale Video Generative Models},
author={Team Wan and Ang Wang and Baole Ai and Bin Wen and Chaojie Mao and Chen-Wei Xie and Di Chen and Feiwu Yu and Haiming Zhao and Jianxiao Yang and Jianyuan Zeng and Jiayu Wang and Jingfeng Zhang and Jingren Zhou and Jinkai Wang and Jixuan Chen and Kai Zhu and Kang Zhao and Keyu Yan and Lianghua Huang and Mengyang Feng and Ningyi Zhang and Pandeng Li and Pingyu Wu and Ruihang Chu and Ruili Feng and Shiwei Zhang and Siyang Sun and Tao Fang and Tianxing Wang and Tianyi Gui and Tingyu Weng and Tong Shen and Wei Lin and Wei Wang and Wei Wang and Wenmeng Zhou and Wente Wang and Wenting Shen and Wenyuan Yu and Xianzhong Shi and Xiaoming Huang and Xin Xu and Yan Kou and Yangyu Lv and Yifei Li and Yijing Liu and Yiming Wang and Yingya Zhang and Yitong Huang and Yong Li and You Wu and Yu Liu and Yulin Pan and Yun Zheng and Yuntao Hong and Yupeng Shi and Yutong Feng and Zeyinzi Jiang and Zhen Han and Zhi-Fan Wu and Ziyu Liu},
journal = {arXiv preprint arXiv:2503.20314},
year={2025}
}本仓库中的模型遵循 Apache 2.0 许可协议。我们对您生成的内容不主张任何权利,您可自由使用相关内容,但须确保使用行为符合该许可条款的规定。您需对模型使用行为承担全部责任,禁止传播任何违反现行法律、侵害个人或群体权益、恶意披露隐私信息、散布不实内容或针对弱势群体的有害内容。完整限制条款及权利细则请参阅许可协议全文。
我们诚挚感谢 SD3、Qwen、umt5-xxl、diffusers 及 HuggingFace 项目的贡献者们对开源研究的支持。