ONNX
wangqiang9 commited on
Commit
2d3be86
·
verified ·
1 Parent(s): 1369ad7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -45
README.md CHANGED
@@ -1,100 +1,99 @@
1
- ---
2
- frameworks:
3
- - Pytorch
4
- license: Apache License 2.0
5
- tasks:
6
- - text-to-video-synthesis
7
-
8
-
9
- # FantasyPortrait:基于表情增强扩散变换器的多角色肖像动画生成
10
 
11
  [![Home Page](https://img.shields.io/badge/Project-FantasyPortrait-blue.svg)](https://fantasy-amap.github.io/fantasy-portrait/)
12
  [![arXiv](https://img.shields.io/badge/Arxiv-2507.12956-b31b1b.svg?logo=arXiv)](https://arxiv.org/abs/2507.12956)
13
- [![hf_dataset](https://img.shields.io/badge/🤗%20Dataset-FantasyPortrait-yellow.svg)](https://huggingface.co/datasets/acvlab/FantasyPortrait)
 
14
  [![hf_paper](https://img.shields.io/badge/🤗-FantasyPortrait-red.svg)](https://huggingface.co/papers/2507.12956)
 
 
15
 
16
- ## 🔥 最新动态!!
17
- * 2025年8月10日:我们已发布推理代码、模型权重和数据集。
18
 
19
- ## 演示
20
- 更多有趣的结果,请访问我们的[网站](https://fantasy-amap.github.io/fantasy-portrait/)
21
 
22
  | ![单人示例](./danren_1.gif) | ![对比](./duibi.gif) |
23
  | :---: | :---: |
24
  | ![动物](./dongwu.gif) | ![双人1](./shuangren_1.gif) |
25
  | ![双人2](./shuangren_2.gif) | ![三人](./sanren.gif) |
26
 
27
- ## 快速开始
28
- ### 🛠️ 安装
29
 
30
- 克隆仓库:
 
 
 
31
 
32
  ```
33
  git clone https://github.com/Fantasy-AMAP/fantasy-portrait.git
34
  cd fantasy-portrait
35
  ```
36
 
37
- 安装依赖:
38
  ```
39
  apt-get install ffmpeg
40
- # 确保 torch >= 2.0.0
41
  pip install -r requirements.txt
42
- # 注意:必须安装 flash attention
43
  pip install flash_attn
44
  ```
45
 
46
- ### 📦 Multi-Expr 数据集
47
- 我们公开了首个多人肖像面部表情视频数据集 **Multi-Expr Dataset**,请通过以下链接下载:
48
 
49
-
50
- ### 🧱 模型下载
51
- | 模型 | 下载链接 | 说明 |
52
  | --------------|-------------------------------------------------------------------------------|-------------------------------|
53
- | Wan2.1-I2V-14B-720P | 🤗 [Huggingface](https://huggingface.co/Wan-AI/Wan2.1-I2V-14B-720P) 🤖 [ModelScope](https://www.modelscope.cn/models/Wan-AI/Wan2.1-I2V-14B-720P) | 基础模型
54
- | FantasyPortrait | 🤗 [Huggingface](https://huggingface.co/acvlab/FantasyPortrait/) 🤖 [ModelScope](https://www.modelscope.cn/models/amap_cvlab/FantasyPortrait/) | 我们的表情条件权重
55
 
56
- 使用 huggingface-cli 下载模型:
57
  ``` sh
58
  pip install "huggingface_hub[cli]"
59
  huggingface-cli download Wan-AI/Wan2.1-I2V-14B-720P --local-dir ./models/Wan2.1-I2V-14B-720P
60
  huggingface-cli download acvlab/FantasyPortrait --local-dir ./models
61
  ```
62
 
63
- 使用 modelscope-cli 下载模型:
64
  ``` sh
65
  pip install modelscope
66
  modelscope download Wan-AI/Wan2.1-I2V-14B-720P --local_dir ./models/Wan2.1-I2V-14B-720P
67
  modelscope download amap_cvlab/FantasyPortrait --local_dir ./models
68
  ```
69
 
70
- ### 🔑 单人肖像推理
71
  ``` sh
72
  bash infer_single.sh
73
  ```
74
 
75
- ### 🔑 多人肖像推理
 
76
  ``` sh
77
  bash infer_multi.sh
78
  ```
 
 
 
 
79
 
 
 
80
 
81
- ### 📦 速度与显存占用
82
- 我们在此提供详细表格。模型在单张A100上进行测试。
83
-
84
- |`torch_dtype`|`num_persistent_param_in_dit`|速度|所需显存|
85
  |-|-|-|-|
86
- |torch.bfloat16|None (无限制)|15.5秒/迭代|40G|
87
- |torch.bfloat16|7*10**9 (7B)|32.8秒/迭代|20G|
88
- |torch.bfloat16|0|42.6秒/迭代|5G|
89
 
90
 
91
 
92
- ## 🧩 社区贡献
93
- 我们 ❤️ 来自开源社区的贡献!如果您的工作改进了 FantasyPortrait,请告知我们。
94
- 您也可以直接发送邮件至 [frank.jf@alibaba-inc.com](mailto://frank.jf@alibaba-inc.com)。我们很乐意引用您的项目,方便大家使用。
95
 
96
- ## 🔗 引用
97
- 如果本仓库对您有帮助,请考虑给我们一个 star ⭐ 并引用以下论文:
98
  ```
99
  @article{wang2025fantasyportrait,
100
  title={FantasyPortrait: Enhancing Multi-Character Portrait Animation with Expression-Augmented Diffusion Transformers},
@@ -104,5 +103,5 @@ bash infer_multi.sh
104
  }
105
  ```
106
 
107
- ## 致谢
108
- 感谢 [Wan2.1](https://github.com/Wan-Video/Wan2.1)[PD-FGC](https://github.com/Dorniwang/PD-FGC-inference) [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) 开源他们的模型和代码,为本项目提供了宝贵的参考和支持。我们非常感谢他们对开源社区的贡献。
 
1
+ # FantasyPortrait: Enhancing Multi-Character Portrait Animation with Expression-Augmented Diffusion Transformers
 
 
 
 
 
 
 
 
2
 
3
  [![Home Page](https://img.shields.io/badge/Project-FantasyPortrait-blue.svg)](https://fantasy-amap.github.io/fantasy-portrait/)
4
  [![arXiv](https://img.shields.io/badge/Arxiv-2507.12956-b31b1b.svg?logo=arXiv)](https://arxiv.org/abs/2507.12956)
5
+ [![hf_dataset](https://img.shields.io/badge/🤗%20Dataset-FantasyPortrait-yellow.svg)](https://huggingface.co/datasets/acvlab/FantasyPortrait-Multi-Expr)
6
+ [![hf_model](https://img.shields.io/badge/🤗%20Model-FantasyPortrait-green.svg)](https://huggingface.co/acvlab/FantasyPortrait)
7
  [![hf_paper](https://img.shields.io/badge/🤗-FantasyPortrait-red.svg)](https://huggingface.co/papers/2507.12956)
8
+ [![ms_model](https://img.shields.io/badge/ModelScope-Model-9cf.svg)](https://modelscope.cn/models/amap_cvlab/FantasyPortrait)
9
+ [![ms_dataset](https://img.shields.io/badge/ModelScope-Dataset-ff69b4.svg)](https://www.modelscope.cn/datasets/amap_cvlab/FantasyPortrait-Multi-Expr)
10
 
11
+ ## 🔥 Latest News!!
12
+ * August 12, 2025: We released the inference code, model weights and datasets.
13
 
14
+ ## Demo
15
+ For more interesting results, please visit our [website](https://fantasy-amap.github.io/fantasy-portrait/).
16
 
17
  | ![单人示例](./danren_1.gif) | ![对比](./duibi.gif) |
18
  | :---: | :---: |
19
  | ![动物](./dongwu.gif) | ![双人1](./shuangren_1.gif) |
20
  | ![双人2](./shuangren_2.gif) | ![三人](./sanren.gif) |
21
 
 
 
22
 
23
+ ## Quickstart
24
+ ### 🛠️Installation
25
+
26
+ Clone the repo:
27
 
28
  ```
29
  git clone https://github.com/Fantasy-AMAP/fantasy-portrait.git
30
  cd fantasy-portrait
31
  ```
32
 
33
+ Install dependencies:
34
  ```
35
  apt-get install ffmpeg
36
+ # Ensure torch >= 2.0.0
37
  pip install -r requirements.txt
38
+ # Note: flash attention must be installed
39
  pip install flash_attn
40
  ```
41
 
42
+ ### 📦Multi-Expr Dataset
43
+ We make public the first multi-portrait facial expression video dataset **Multi-Expr Dataset**, Please download it via the [ModelScope](https://www.modelscope.cn/datasets/amap_cvlab/FantasyPortrait-Multi-Expr) or [Huggingface](https://huggingface.co/datasets/acvlab/FantasyPortrait-Multi-Expr).
44
 
45
+ ### 🧱Model Download
46
+ | Models | Download Link | Notes |
 
47
  | --------------|-------------------------------------------------------------------------------|-------------------------------|
48
+ | Wan2.1-I2V-14B-720P | 🤗 [Huggingface](https://huggingface.co/Wan-AI/Wan2.1-I2V-14B-720P) 🤖 [ModelScope](https://www.modelscope.cn/models/Wan-AI/Wan2.1-I2V-14B-720P) | Base model
49
+ | FantasyPortrait | 🤗 [Huggingface](https://huggingface.co/acvlab/FantasyPortrait/) 🤖 [ModelScope](https://www.modelscope.cn/models/amap_cvlab/FantasyPortrait/) | Our emo condition weights
50
 
51
+ Download models using huggingface-cli:
52
  ``` sh
53
  pip install "huggingface_hub[cli]"
54
  huggingface-cli download Wan-AI/Wan2.1-I2V-14B-720P --local-dir ./models/Wan2.1-I2V-14B-720P
55
  huggingface-cli download acvlab/FantasyPortrait --local-dir ./models
56
  ```
57
 
58
+ Download models using modelscope-cli:
59
  ``` sh
60
  pip install modelscope
61
  modelscope download Wan-AI/Wan2.1-I2V-14B-720P --local_dir ./models/Wan2.1-I2V-14B-720P
62
  modelscope download amap_cvlab/FantasyPortrait --local_dir ./models
63
  ```
64
 
65
+ ### 🔑 Single-Portrait Inference
66
  ``` sh
67
  bash infer_single.sh
68
  ```
69
 
70
+ ### 🔑 Multi-Portrait Inference
71
+ If you use input image and drive videos with multiple people, you can run as follows:
72
  ``` sh
73
  bash infer_multi.sh
74
  ```
75
+ If you use input image with multiple people and different multiple single-human driven videos, you can run as follows:
76
+ ```sh
77
+ bash infer_multi_diff.sh
78
+ ```
79
 
80
+ ### 📦Speed and VRAM Usage
81
+ We present a detailed table here. The model is tested on a single A100.
82
 
83
+ |`torch_dtype`|`num_persistent_param_in_dit`|Speed|Required VRAM|
 
 
 
84
  |-|-|-|-|
85
+ |torch.bfloat16|None (unlimited)|15.5s/it|40G|
86
+ |torch.bfloat16|7*10**9 (7B)|32.8s/it|20G|
87
+ |torch.bfloat16|0|42.6s/it|5G|
88
 
89
 
90
 
91
+ ## 🧩 Community Works
92
+ We ❤️ contributions from the open-source community! If your work has improved FantasyPortrait, please inform us.
93
+ Or you can directly e-mail [frank.jf@alibaba-inc.com](mailto://frank.jf@alibaba-inc.com). We are happy to reference your project for everyone's convenience.
94
 
95
+ ## 🔗Citation
96
+ If you find this repository useful, please consider giving a star ⭐ and citation
97
  ```
98
  @article{wang2025fantasyportrait,
99
  title={FantasyPortrait: Enhancing Multi-Character Portrait Animation with Expression-Augmented Diffusion Transformers},
 
103
  }
104
  ```
105
 
106
+ ## Acknowledgments
107
+ Thanks to [Wan2.1](https://github.com/Wan-Video/Wan2.1), [PD-FGC](https://github.com/Dorniwang/PD-FGC-inference) and [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) for open-sourcing their models and code, which provided valuable references and support for this project. Their contributions to the open-source community are truly appreciated.