daVinci-MagiHuman 采用单流 Transformer,以文本令牌、参考图像潜变量以及含噪视频和音频令牌作为输入,并在统一的令牌序列内对视频和音频进行联合去噪。
关键设计选择:
| 组件 | 描述 |
|---|---|
| 三明治架构 | 前4层和后4层采用特定模态投影;中间32层跨模态共享参数 |
| 无时间步去噪 | 无显式时间步嵌入——模型直接从输入潜变量推断去噪状态 |
| 每头门控 | 每个注意力头上带有 sigmoid 激活函数的学习标量门控,以确保训练稳定性 |
| 统一条件控制 | 通过最小化的统一接口处理去噪和参考信号——无专用条件控制分支 |
| 模型 | 视觉质量 ↑ | 文本对齐 ↑ | 物理一致性 ↑ | 词错误率 ↓ |
|---|---|---|---|---|
| OVI 1.1 | 4.73 | 4.10 | 4.41 | 40.45% |
| LTX 2.3 | 4.76 | 4.12 | 4.56 | 19.23% |
| daVinci-MagiHuman | 4.80 | 4.18 | 4.52 | 14.60% |
| 对比组合 | daVinci-MagiHuman 胜出 | 平局 | 对手胜出 |
|---|---|---|---|
| vs Ovi 1.1 | 80.0% | 8.2% | 11.8% |
| vs LTX 2.3 | 60.9% | 17.2% | 21.9% |
| 分辨率 | 基础模型(秒) | 超分辨率(秒) | 解码(秒) | 总计(秒) |
|---|---|---|---|---|
| 256p | 1.6 | — | 0.4 | 2.0 |
| 540p | 1.6 | 5.1 | 1.3 | 8.0 |
| 1080p | 1.6 | 31.0 | 5.8 | 38.4 |
# Pull the MagiCompiler Docker image
docker pull sandai/magi-compiler:latest
# Launch container
docker run -it --gpus all \
-v /path/to/models:/models \
sandai/magi-compiler:latest bash
# Install MagiCompiler
git clone https://github.com/SandAI-org/MagiCompiler
cd MagiCompiler
pip install -e . --no-build-isolation --config-settings editable_mode=compat
cd ..
# Clone daVinci-MagiHuman
git clone https://github.com/GAIR-NLP/daVinci-MagiHuman
cd daVinci-MagiHuman# Create environment
conda create -n davinci python=3.12
conda activate davinci
# Install PyTorch
pip install torch==2.9.0 torchvision==0.24.0 torchaudio==2.9.0
# Install Flash Attention (Hopper)
git clone https://github.com/Dao-AILab/flash-attention
cd flash-attention/hopper && python setup.py install && cd ../..
# Install MagiCompiler
git clone https://github.com/SandAI-org/MagiCompiler
cd MagiCompiler
pip install -e . --no-build-isolation --config-settings editable_mode=compat
cd ..
# Clone and install daVinci-MagiHuman
git clone https://github.com/GAIR-NLP/daVinci-MagiHuman
cd daVinci-MagiHuman
pip install -r requirements.txt从 HuggingFace 下载完整的模型堆栈,并更新 example/ 目录下配置文件中的路径。
运行前,请更新配置文件(example/*/config.json)中的检查点路径,使其指向您的本地模型目录。
基础模型(256p)
bash example/base/run.sh蒸馏模型(256p,8步,无CFG)
bash example/distill/run.sh超分辨率至 540p
bash example/sr_540p/run.sh超分辨率至 1080p
bash example/sr_1080p/run.sh感谢开源社区,特别感谢 Wan2.2 和 Turbo-VAED 所做出的宝贵贡献。
本项目基于 Apache License 2.0 许可证发布。
@misc{davinci-magihuman-2026,
title = {Speed by Simplicity: A Single-Stream Architecture for Fast Audio-Video Generative Foundation Model},
author = {SII-GAIR and Sand.ai},
year = {2026},
url = {https://github.com/GAIR-NLP/daVinci-MagiHuman}
}