--- license: other license_name: apache-2.0-and-third-party-model-terms license_link: https://huggingface.co/audio-cpp/DITTO-GGUF/blob/main/README.md#license base_model: digital-avatar/ditto-talkinghead pipeline_tag: image-to-video tags: - gguf - audio.cpp - talking-head - audio-driven-animation --- # DITTO GGUF > [!WARNING] > The combined packages include InsightFace weights restricted to **non-commercial research**. See [License](#license). Animate a portrait from speech with [Ant Group’s DITTO](https://github.com/antgroup/ditto-talkinghead), running natively in [audio.cpp](https://github.com/0xShug0/audio.cpp). Supply an image or reference video and driving audio. The model generates talking-portrait frames, not speech. ## Mona Lisa demos Same portrait, 15.75-second speech recording, seed 2026, 50 denoising steps and guidance 2. Both use CUDA with the cuDNN/F16 renderer and output 25 FPS. These are complete offline generations, not recordings of live streaming. **F16** [Download F16 video](https://huggingface.co/audio-cpp/DITTO-GGUF/resolve/main/demos/mona-lisa-f16.mp4) **Mixed Q8** [Download Q8 video](https://huggingface.co/audio-cpp/DITTO-GGUF/resolve/main/demos/mona-lisa-q8_0.mp4) ## Packages | File | Size | Use | |---|---:|---| | [ditto-f16.gguf](ditto-f16.gguf) | 1.204 GiB | Recommended; closer agreement with the reference. | | [ditto-q8_0.gguf](ditto-q8_0.gguf) | 0.878 GiB | Smaller storage with greater numerical drift. | Each standalone GGUF embeds HuBERT, motion diffusion, portrait rendering, face-analysis and eye-conditioning weights, configuration and the audio.cpp model specification. No separate model downloads are required for inference. F16 stores projection and renderer convolution weights in half precision. Mixed Q8 quantizes eligible projection weights and retains F16 renderer convolutions. Normalization and conditioning constants retain F32. These labels describe package storage; component loaders may retain F32 computation. ## Run From an audio.cpp checkout containing DITTO support: ```bash build/debug/bin/audiocpp_cli --family ditto --task gen \ --model /path/to/ditto-f16.gguf --backend cuda --threads 8 \ --audio /path/to/driving-speech.wav \ --request-option reference_image_file=/path/to/mona-lisa.jpg \ --seed 2026 --request-option num_inference_steps=50 \ --request-option guidance_scale=2 \ --out-dir outputs/ditto --log ``` Substitute `ditto-q8_0.gguf` for Q8. The default renderer uses GGML. To select the renderer used for these demos and measurements, add: ```bash --session-option 'ditto.exec_plan={"renderer":{"impl":"cudnn"}}' ``` This requires a CUDA build with both `GGML_CUDA_CUDNN_CONV2D` and `GGML_CUDA_CUDNN_CONV3D` enabled and compatible cuDNN runtime libraries. Otherwise retain the default GGML renderer. CPU and Vulkan use GGML. The CLI exports RGB24 frames and JSON metadata. Encode them, then mux the input audio: ```bash python tools/models/video_artifacts_render.py \ --input outputs/ditto --pattern 'ditto_video_*.json' \ --output outputs/ditto/video.mp4 ffmpeg -i outputs/ditto/video.mp4 -i /path/to/driving-speech.wav \ -c:v copy -c:a aac -movflags +faststart outputs/ditto/with-audio.mp4 ``` For a source video, use `reference_video_file` instead of `reference_image_file`. Video decoding uses FFmpeg shared libraries in-process. Audio is mixed to mono and resampled to 16 kHz using libsoxr; if unavailable, the shared sinc fallback emits a warning and may introduce numerical drift. ## Streaming The C++ session also accepts incremental **mono 16 kHz PCM** and emits ordered video-frame artifacts as input arrives. Its 80-frame motion window and 10-frame overlap require roughly **3.2 seconds of initial audio context**. Finalization flushes the remaining frames. Session-owned graphs and prepared source features are reused. Streaming support does not imply immediate first-frame output or real-time speed on every device. See the [audio.cpp DITTO documentation](https://github.com/0xShug0/audio.cpp/blob/feature/ditto/docs/models/ditto.md) for options and validation scope. ## Measured performance and quality RTX 5090, eight threads, Debug build, cuDNN/F16 renderer, official 15.7546875-second example and original 1432×1432 portrait—not the Mona Lisa demo. Each package ran sequentially with one warmup and two measured requests in the same session. | Package | Warm RTF | Peak process VRAM | Full-frame / face SSIM vs Python | |---|---:|---:|---:| | F32 validation control, not distributed | 0.6445 | 3,114 MiB | 0.992249 / 0.987999 | | F16 | 0.6505 | 3,024 MiB | 0.992095 / 0.987799 | | Mixed Q8 | 0.6516 | 3,024 MiB | 0.987622 / 0.982806 | RTF is generation time divided by input duration; lower is better. Timings use `session.wall_ms`, excluding model loading, frame-file export and MP4 encoding. Process VRAM was sampled every 200 ms. The roughly 1% timing differences do not demonstrate a speed advantage; the main benefit is smaller packages, with a measured 90 MiB VRAM reduction. Quality compares all 394 frames with a saved official Python output, using identical video encoding and a fixed face crop. SSIM measures image agreement, not an independent perceptual or lip-sync score. Each package produced byte-identical frame artifacts across its three requests. These package measurements cover CUDA offline generation; no CPU/Vulkan performance claim is made. ## License DITTO’s upstream code is [Apache-2.0](https://github.com/antgroup/ditto-talkinghead/blob/main/LICENSE). Its pipeline incorporates LivePortrait and third-party components with their own terms. **The bundled InsightFace face-detection and landmark checkpoints are restricted to non-commercial research.** DITTO’s Apache-2.0 code license does not override those restrictions. See [InsightFace’s model license policy](https://github.com/deepinsight/insightface#license) and retain applicable upstream notices when redistributing the combined packages. See [NOTICE](NOTICE) and [the upstream Apache-2.0 code license](LICENSE.apache-2.0). This model card does not grant additional rights. Original checkpoints: [digital-avatar/ditto-talkinghead](https://huggingface.co/digital-avatar/ditto-talkinghead). DITTO is by Tianqi Li, Ruobing Zheng, Minghui Yang, Jingdong Chen and Ming Yang at Ant Group. ## Demo credits Portrait: Leonardo da Vinci’s *Mona Lisa*, [public-domain reproduction from Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Mona_Lisa.jpg), resized to 768 pixels wide. [Source portrait](demos/mona-lisa.jpg). Driving audio: the [official DITTO example](https://github.com/antgroup/ditto-talkinghead/blob/main/example/audio.wav), resampled to mono 16 kHz. [Demo audio](demos/driving-speech.wav). Both videos are synthetic animations of a painting, not authentic recordings.