- 2025年8月14日:我们的工作被加入到ComfyUI-Wan ! 感谢 kijai 更新 👏!
- 2025年8月12日:我们已发布推理代码、模型权重和数据集。
更多有趣的结果,请访问我们的网站。
![]() |
![]() |
|---|---|
![]() |
![]() |
![]() |
![]() |
克隆仓库:
git clone https://github.com/Fantasy-AMAP/fantasy-portrait.git
cd fantasy-portrait
安装依赖:
apt-get install ffmpeg
# 确保 torch >= 2.0.0
pip install -r requirements.txt
# 注意:必须安装 flash attention
pip install flash_attn
我们公开了首个多人肖像面部表情视频数据集 Multi-Expr Dataset,请通过这个ModelScope或者Huggingface下载。
| 模型 | 下载链接 | 说明 |
|---|---|---|
| Wan2.1-I2V-14B-720P | 🤗 Huggingface 🤖 ModelScope | 基础模型 |
| FantasyPortrait | 🤗 Huggingface 🤖 ModelScope | 我们的表情条件权重 |
使用 huggingface-cli 下载模型:
pip install "huggingface_hub[cli]"
huggingface-cli download Wan-AI/Wan2.1-I2V-14B-720P --local-dir ./models/Wan2.1-I2V-14B-720P
huggingface-cli download acvlab/FantasyPortrait --local-dir ./models使用 modelscope-cli 下载模型:
pip install modelscope
modelscope download Wan-AI/Wan2.1-I2V-14B-720P --local_dir ./models/Wan2.1-I2V-14B-720P
modelscope download amap_cvlab/FantasyPortrait --local_dir ./modelsbash infer_single.sh如果你使用多人的输入图像和多人的驱动视频,您可以运行如下脚本:
bash infer_multi.sh如果您使用多人输入图像和不同的多个单人驱动的视频,您可以运行如下脚本:
bash infer_multi_diff.sh我们在此提供详细表格。模型在单张A100上进行测试。
torch_dtype |
num_persistent_param_in_dit |
速度 | 所需显存 |
|---|---|---|---|
| torch.bfloat16 | None (无限制) | 15.5秒/迭代 | 40G |
| torch.bfloat16 | 7*10**9 (7B) | 32.8秒/迭代 | 20G |
| torch.bfloat16 | 0 | 42.6秒/迭代 | 5G |
我们 ❤️ 来自开源社区的贡献!如果您的工作改进了 FantasyPortrait,请告知我们。 您也可以直接发送邮件至 frank.jf@alibaba-inc.com。我们很乐意引用您的项目,方便大家使用。
如果本仓库对您有帮助,请考虑给我们一个 star ⭐ 并引用以下论文:
@article{wang2025fantasyportrait,
title={FantasyPortrait: Enhancing Multi-Character Portrait Animation with Expression-Augmented Diffusion Transformers},
author={Wang, Qiang and Wang, Mengchao and Jiang, Fan and Fan, Yaqi and Qi, Yonggang and Xu, Mu},
journal={arXiv preprint arXiv:2507.12956},
year={2025}
}
感谢 Wan2.1、PD-FGC 和 DiffSynth-Studio 开源他们的模型和代码,为本项目提供了宝贵的参考和支持。我们非常感谢他们对开源社区的贡献。





