ONNX Model Zoo

digital-avatar/ditto-talkinghead

By digital-avatar · ↓ 0 · ♥ 31 · Updated 2025-11-12

What's in this repo

This page lists the files in digital-avatar/ditto-talkinghead, including appearance_extractor.onnx, blaze_face.onnx, decoder.onnx and more.

  • 17 ONNX models (.onnx files)
  • 45 files, including 17 .onnx, 12 .engine, 6 .pth, 3 .pkl, 1 .md, 1 .so
  • Repository size ~6.5 GB
  • Last updated 2025-11-12

ONNX files

File Size Download
ditto_onnx/appearance_extractor.onnx 3.2 MB Download
ditto_onnx/blaze_face.onnx 409 KB Download
ditto_onnx/decoder.onnx 211 MB Download
ditto_onnx/face_mesh.onnx 4.7 MB Download
ditto_onnx/hubert.onnx 1.4 GB Download
ditto_onnx/insightface_det.onnx 16.1 MB Download
ditto_onnx/landmark106.onnx 4.7 MB Download
ditto_onnx/landmark203.onnx 109 MB Download
ditto_onnx/lmdm_v0.4_hubert.onnx 184 MB Download
ditto_onnx/motion_extractor.onnx 107 MB Download

Showing 10 of 17 .onnx files — see the full file list on the right.

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Ditto: Motion-Space Diffusion for Controllable Realtime Talking Head Synthesis

Tianqi Li
·
Ruobing Zheng†
·
Minghui Yang
·
Jingdong Chen
·
Ming Yang

Ant Group

[![](https://img.shields.io/badge/Paper-arXiv-red)](https://arxiv.org/abs/2411.19509)
[![](https://img.shields.io/badge/Project-Page-blue)](https://digital-avatar.github.io/ai/Ditto/)
[![](https://img.shields.io/badge/Model-HuggingFace-yellow)](https://huggingface.co/digital-avatar/ditto-talkinghead)
[![](https://img.shields.io/badge/Code-GitHub-purple)](https://github.com/antgroup/ditto-talkinghead)

[![](https://img.shields.io/badge/Demo-Colab-orange)](https://colab.research.google.com/drive/19SUi1TiO32IS-Crmsu9wrkNspWE8tFbs?usp=sharing)





✨  For more results, visit our [Project Page](https://digital-avatar.github.io/ai/Ditto/) ✨ 

📌 Updates

  • [2025.11.12] 🔥🔥 We noticed the community's enthusiasm for open-source training code. Training code is now available.
  • [2025.07.11] 🔥 The PyTorch model is now available.
  • [2025.07.07] 🔥 Ditto is accepted by ACM MM 2025.
  • [2025.01.21] 🔥 We update the Colab demo, welcome to try it.
  • [2025.01.10] 🔥 We release our inference codes and models.
  • [2024.11.29] 🔥 Our paper is in public on arxiv.

🛠️ Installation

Tested Environment

  • System: Centos 7.2
  • GPU: A100
  • Python: 3.10
  • tensorRT: 8.6.1

Clone the codes from GitHub:

git clone https://github.com/antgroup/ditto-talkinghead
cd ditto-talkinghead

Conda

Create conda environment:

conda env create -f environment.yaml
conda activate ditto

Pip

If you have problems creating a conda environment, you can also refer to our Colab. After correctly installing pytorch, cuda and cudnn, you only need to install a few packages using pip:

pip install \
    tensorrt==8.6.1 \
    librosa \
    tqdm \
    filetype \
    imageio \
    opencv_python_headless \
    scikit-image \
    cython \
    cuda-python \
    imageio-ffmpeg \
    colored \
    polygraphy \
    numpy==2.0.1

If you don't use conda, you may also need to install ffmpeg according to the official website.

📥 Download Checkpoints

Download checkpoints from HuggingFace and put them in checkpoints dir:

git lfs install
git clone https://huggingface.co/digital-avatar/ditto-talkinghead checkpoints

The checkpoints should be like:

./checkpoints/
├── ditto_cfg
│   ├── v0.4_hubert_cfg_trt.pkl
│   └── v0.4_hubert_cfg_trt_online.pkl
├── ditto_onnx
│   ├── appearance_extractor.onnx
│   ├── blaze_face.onnx
│   ├── decoder.onnx
│   ├── face_mesh.onnx
│   ├── hubert.onnx
│   ├── insightface_det.onnx
│   ├── landmark106.onnx
│   ├── landmark203.onnx
│   ├── libgrid_sample_3d_plugin.so
│   ├── lmdm_v0.4_hubert.onnx
│   ├── motion_extractor.onnx
│   ├── stitch_network.onnx
│   └── warp_network.onnx
└── ditto_trt_Ampere_Plus
    ├── appearance_extractor_fp16.engine
    ├── blaze_face_fp16.engine
    ├── decoder_fp16.engine
    ├── face_mesh_fp16.engine
    ├── hubert_fp32.engine
    ├── insightface_det_fp16.engine
    ├── landmark106_fp16.engine
    ├── landmark203_fp16.engine
    ├── lmdm_v0.4_hubert_fp32.engine
    ├── motion_extractor_fp32.engine
    ├── stitch_network_fp16.engine
    └── warp_network_fp16.engine
  • The ditto_cfg/v0.4_hubert_cfg_trt_online.pkl is online config
  • The ditto_cfg/v0.4_hubert_cfg_trt.pkl is offline config

🚀 Inference

Run inference.py:

python inference.py \
    --data_root "<path-to-trt-model>" \
    --cfg_pkl "<path-to-cfg-pkl>" \
    --audio_path "<path-to-input-audio>" \
    --source_path "<path-to-input-image>" \
    --output_path "<path-to-output-mp4>" 

For example:

python inference.py \
    --data_root "./checkpoints/ditto_trt_Ampere_Plus" \
    --cfg_pkl "./checkpoints/ditto_cfg/v0.4_hubert_cfg_trt.pkl" \
    --audio_path "./example/audio.wav" \
    --source_path "./example/image.png" \
    --output_path "./tmp/result.mp4" 

❗Note:

We have provided the tensorRT model with hardware-compatibility-level=Ampere_Plus (checkpoints/ditto_trt_Ampere_Plus/). If your GPU does not support it, please execute the cvt_onnx_to_trt.py script to convert from the general onnx model (checkpoints/ditto_onnx/) to the tensorRT model.

python scripts/cvt_onnx_to_trt.py --onnx_dir "./checkpoints/ditto_onnx" --trt_dir "./checkpoints/ditto_trt_custom"

Then 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. Please refer to Download Checkpoints to prepare the model files.

The checkpoints should be like:

./checkpoints/
├── ditto_cfg
│   ├── ...
│   └── v0.4_hubert_cfg_pytorch.pkl
├── ...
└── ditto_pytorch
    ├── aux_models
    │   ├── 2d106det.onnx
    │   ├── det_10g.onnx
    │   ├── face_landmarker.task
    │   ├── hubert_streaming_fix_kv.onnx
    │   └── landmark203.onnx
    └── models
        ├── appearance_extractor.pth
        ├── decoder.pth
        ├── lmdm_v0.4_hubert.pth
        ├── motion_extractor.pth
        ├── stitch_network.pth
        └── warp_network.pth

To run inference, execute the following command:

python inference.py \
    --data_root "./checkpoints/ditto_pytorch" \
    --cfg_pkl "./checkpoints/ditto_cfg/v0.4_hubert_cfg_pytorch.pkl" \
    --audio_path "./example/audio.wav" \
    --source_path "./example/image.png" \
    --output_path "./tmp/result.mp4" 

📧 Acknowledgement

Our implementation is based on S2G-MDDiffusion and LivePortrait. Thanks for their remarkable contribution and released code! If we missed any open-source projects or related articles, we would like to complement the acknowledgement of this specific work immediately.

⚖️ License

This repository is released under the Apache-2.0 license as found in the LICENSE file.

📚 Citation

If you find this codebase useful for your research, please use the following entry.

@article{li2024ditto,
    title={Ditto: Motion-Space Diffusion for Controllable Realtime Talking Head Synthesis},
    author={Li, Tianqi and Zheng, Ruobing and Yang, Minghui and Chen, Jingdong and Yang, Ming},
    journal={arXiv preprint arXiv:2411.19509},
    year={2024}
}

🌟 Star History

Star History Chart

Model info

onnx arxiv:2411.19509 region:us
↓ 0 ♥ 31

Created: 2025-01-10

Updated: 2025-11-12

View on Hugging Face

Files (45)

.gitattributes
.gitignore
LICENSE
README.md
ditto_cfg/v0.4_hubert_cfg_pytorch.pkl
ditto_cfg/v0.4_hubert_cfg_trt.pkl
ditto_cfg/v0.4_hubert_cfg_trt_online.pkl
ditto_onnx/appearance_extractor.onnx 3.2 MB ONNX
ditto_onnx/blaze_face.onnx 409 KB ONNX
ditto_onnx/decoder.onnx 211 MB ONNX
ditto_onnx/face_mesh.onnx 4.7 MB ONNX
ditto_onnx/hubert.onnx 1.4 GB ONNX
ditto_onnx/insightface_det.onnx 16.1 MB ONNX
ditto_onnx/landmark106.onnx 4.7 MB ONNX
ditto_onnx/landmark203.onnx 109 MB ONNX
ditto_onnx/libgrid_sample_3d_plugin.so
ditto_onnx/lmdm_v0.4_hubert.onnx 184 MB ONNX
ditto_onnx/motion_extractor.onnx 107 MB ONNX
ditto_onnx/stitch_network.onnx 181 KB ONNX
ditto_onnx/warp_network.onnx 190 MB ONNX
ditto_onnx/warp_network_ori.onnx 190 MB ONNX
ditto_pytorch/aux_models/2d106det.onnx 4.8 MB ONNX
ditto_pytorch/aux_models/det_10g.onnx 16.1 MB ONNX
ditto_pytorch/aux_models/face_landmarker.task
ditto_pytorch/aux_models/hubert_streaming_fix_kv.onnx 1.4 GB ONNX
ditto_pytorch/aux_models/landmark203.onnx 109 MB ONNX
ditto_pytorch/models/appearance_extractor.pth
ditto_pytorch/models/decoder.pth
ditto_pytorch/models/lmdm_v0.4_hubert.pth
ditto_pytorch/models/motion_extractor.pth
ditto_pytorch/models/stitch_network.pth
ditto_pytorch/models/warp_network.pth
ditto_trt_Ampere_Plus/.DS_Store
ditto_trt_Ampere_Plus/appearance_extractor_fp16.engine
ditto_trt_Ampere_Plus/blaze_face_fp16.engine
ditto_trt_Ampere_Plus/decoder_fp16.engine
ditto_trt_Ampere_Plus/face_mesh_fp16.engine
ditto_trt_Ampere_Plus/hubert_fp32.engine
ditto_trt_Ampere_Plus/insightface_det_fp16.engine
ditto_trt_Ampere_Plus/landmark106_fp16.engine
ditto_trt_Ampere_Plus/landmark203_fp16.engine
ditto_trt_Ampere_Plus/lmdm_v0.4_hubert_fp32.engine
ditto_trt_Ampere_Plus/motion_extractor_fp32.engine
ditto_trt_Ampere_Plus/stitch_network_fp16.engine
ditto_trt_Ampere_Plus/warp_network_fp16.engine

Related models