Update README.md
Browse files
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 |
[](https://fantasy-amap.github.io/fantasy-portrait/)
|
| 12 |
[](https://arxiv.org/abs/2507.12956)
|
| 13 |
-
[](https://huggingface.co/datasets/acvlab/FantasyPortrait)
|
|
|
|
| 14 |
[](https://huggingface.co/papers/2507.12956)
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
## 🔥
|
| 17 |
-
* 2025
|
| 18 |
|
| 19 |
-
##
|
| 20 |
-
|
| 21 |
|
| 22 |
|  |  |
|
| 23 |
| :---: | :---: |
|
| 24 |
|  |  |
|
| 25 |
|  |  |
|
| 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 |
-
#
|
| 41 |
pip install -r requirements.txt
|
| 42 |
-
#
|
| 43 |
pip install flash_attn
|
| 44 |
```
|
| 45 |
|
| 46 |
-
### 📦
|
| 47 |
-
|
| 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 |
-
|
| 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 |
-
|
| 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 (
|
| 87 |
-
|torch.bfloat16|7*10**9 (7B)|32.
|
| 88 |
-
|torch.bfloat16|0|42.
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
-
## 🧩
|
| 93 |
-
|
| 94 |
-
|
| 95 |
|
| 96 |
-
## 🔗
|
| 97 |
-
|
| 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 |
-
|
|
|
|
| 1 |
+
# FantasyPortrait: Enhancing Multi-Character Portrait Animation with Expression-Augmented Diffusion Transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
[](https://fantasy-amap.github.io/fantasy-portrait/)
|
| 4 |
[](https://arxiv.org/abs/2507.12956)
|
| 5 |
+
[](https://huggingface.co/datasets/acvlab/FantasyPortrait-Multi-Expr)
|
| 6 |
+
[](https://huggingface.co/acvlab/FantasyPortrait)
|
| 7 |
[](https://huggingface.co/papers/2507.12956)
|
| 8 |
+
[](https://modelscope.cn/models/amap_cvlab/FantasyPortrait)
|
| 9 |
+
[](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 |
|  |  |
|
| 18 |
| :---: | :---: |
|
| 19 |
|  |  |
|
| 20 |
|  |  |
|
| 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.
|