[{"source":{"position":1,"lines":["
Ditto(仓库 <a href="https://github.com/antgroup/ditto-talkinghead">antgroup/ditto-talkinghead)是蚂蚁集团开源的实时说话头像合成模型,论文《Ditto: Motion-Space Diffusion for Controllable Realtime Talking Head Synthesis》,已被 ACM MM 2025 接收。它的核心思路是把面部运动和图像渲染解耦:在"运动空间"里做扩散,只生成运动信号,再由渲染网络贴回人脸,从而实现单张照片 + 音频 → 实时说话视频,而且官方 2025 年 11 月 12 日开源了训练代码(train 分支)。与 EchoMimic 那种离线扩散生成不同,Ditto 主打"实时"两个字,官方还提供了 PyTorch 版权重和 TensorRT 两种推理后端。
"]},"target":{"position":1,"lines":["Ditto(仓库 <a href="https://github.com/antgroup/ditto-talkinghead" target="_blank" rel="noopener">antgroup/ditto-talkinghead)是蚂蚁集团开源的实时说话头像合成模型,论文《Ditto: Motion-Space Diffusion for Controllable Realtime Talking Head Synthesis》,已被 ACM MM 2025 接收。它的核心思路是把面部运动和图像渲染解耦:在"运动空间"里做扩散,只生成运动信号,再由渲染网络贴回人脸,从而实现单张照片 + 音频 → 实时说话视频,而且官方 2025 年 11 月 12 日开源了训练代码(train 分支)。与 EchoMimic 那种离线扩散生成不同,Ditto 主打"实时"两个字,官方还提供了 PyTorch 版权重和 TensorRT 两种推理后端。
"]},"type":"CHANGE"},{"source":{"position":32,"lines":["https://github.com/antgroup/ditto-talkinghead"]},"target":{"position":32,"lines":["<a href="https://github.com/antgroup/ditto-talkinghead" target="_blank" rel="noopener">https://github.com/antgroup/ditto-talkinghead"]},"type":"CHANGE"},{"source":{"position":36,"lines":["仓库 README(https://github.com/antgroup/ditto-talkinghead/blob/main/README.md)"]},"target":{"position":36,"lines":["仓库 README(<a href="https://github.com/antgroup/ditto-talkinghead/blob/main/README.md)" target="_blank" rel="noopener">https://github.com/antgroup/ditto-talkinghead/blob/main/README.md)"]},"type":"CHANGE"},{"source":{"position":40,"lines":["Colab:https://colab.research.google.com/drive/19SUi1TiO32IS-Crmsu9wrkNspWE8tFbs"]},"target":{"position":40,"lines":["Colab:<a href="https://colab.research.google.com/drive/19SUi1TiO32IS-Crmsu9wrkNspWE8tFbs" target="_blank" rel="noopener">https://colab.research.google.com/drive/19SUi1TiO32IS-Crmsu9wrkNspWE8tFbs"]},"type":"CHANGE"},{"source":{"position":86,"lines":["不用 conda 时还需按 https://www.ffmpeg.org/download.html 自行安装 ffmpeg(官方原文)。
"]},"target":{"position":86,"lines":["不用 conda 时还需按 <a href="https://www.ffmpeg.org/download.html" target="_blank" rel="noopener">https://www.ffmpeg.org/download.html 自行安装 ffmpeg(官方原文)。
"]},"type":"CHANGE"},{"source":{"position":232,"lines":[" 解决:按 https://www.ffmpeg.org/download.html 安装并加入 PATH。"]},"target":{"position":232,"lines":[" 解决:按 <a href="https://www.ffmpeg.org/download.html" target="_blank" rel="noopener">https://www.ffmpeg.org/download.html 安装并加入 PATH。"]},"type":"CHANGE"},{"source":{"position":259,"lines":["安装部署(实操步骤)
1. 前置准备
- 项目仓库:antgroup/ditto-talkinghead(https://github.com/antgroup/ditto-talkinghead)
- 需要本机具备 Git;按项目语言准备对应运行时(Python / Node.js / Go / Java 等)
- 建议先在本机或测试服务器上跑通,再部署到生产环境
- 遇到依赖版本问题时,以仓库 README 与 Releases 说明为准
2. 官方安装 / 启动命令(摘自项目 README,可直接复制执行)
git clone https://github.com/antgroup/ditto-talkinghead
cd ditto-talkingheadpip install \
tensorrt==8.6.1 \
librosa \
tqdm \
filetype \
imageio \
opencv_python_headless \
scikit-image \
cython \
cuda-python \
imageio-ffmpeg \
colored \
polygraphy \
numpy==2.0.1git lfs install
git clone https://huggingface.co/digital-avatar/ditto-talkinghead checkpointsThen run `inference.py` with `--data_root=./checkpoints/ditto_trt_custom`.
## ⚡ PyTorch Model
*Based on community interest and to better support further development, we are now open-sourcing the PyTorch version of the model.*
We have added the PyTorch model and corresponding configuration files to the [HuggingFace](https://huggingface.co/digital-avatar/ditto-talkinghead). Please refer to [Download Checkpoints](#-download-checkpoints) to prepare the model files.
The `checkpoints` should be like:3. 部署流程
- 克隆仓库:
git clone https://github.com/antgroup/ditto-talkinghead - 进入目录后按上面的官方命令安装依赖
- 参考 README 的配置说明填写配置文件或环境变量
- 按官方说明启动服务,确认监听端口与访问地址
- 浏览器访问验证功能,确认无报错后再开放外网
4. 常见问题排查
- 依赖安装失败:先升级包管理器,再确认运行时版本符合 README 要求
- 启动报端口占用:修改配置中的端口或释放被占用端口
- 页面打不开:检查防火墙 / 安全组是否放行对应端口
- 功能异常:查看运行日志,对照 Issues 中同类问题处理