talkinghead: Real-Time Lip Sync From 169 MB of Weights
talkinghead distils Ant Group's Ditto into 169 MB that runs at 25 fps on a laptop, and ComfyUI nodes turn one photo plus an audio clip into a talking video.
Four demo clips from the project. Top left to bottom right: Mona Lisa, Napoleon, Girl with a Pearl Earring, and a photographed face speaking English. Source: Ampixa/talkinghead
The 11-second Mona Lisa demo, rendered with the real-time model.
What it is
It is a distillation of Ditto, Ant Group's talking-head model. The audio encoder drops from 315M to 18M parameters, the motion model from 48M to 19M and the warp from 46M to 13M, with a pruned decoder behind them. Ditto's appearance extractor, motion extractor and stitching weights are kept as they are.
Lip sync is close to the teacher rather than equal: 4.91 SyncNet LSE-C against 5.12 for original Ditto on one small-face case, and the author says a full comparison is still pending.
Two limits matter in practice. Speech is supported for English and Nepali only, and the photo has to be frontal with a closed mouth, or the mouth will not close in the output. Dubbing an existing video is marked experimental.
Run it in ComfyUI
The node pack lives in a separate repo, voidash/ComfyUI-talkinghead, and installs this package as a dependency:
git clone https://github.com/voidash/ComfyUI-talkinghead.gitintoComfyUI/custom_nodes/.- Run
pip install -r requirements.txtwith ComfyUI's own Python environment. - Restart ComfyUI, then load
example_workflows/talkinghead.jsonfrom the pack.
The two nodes are talkinghead Load Avatar (image in) and talkinghead Speak (avatar plus audio, with emotion, head motion and gesture options). Weights download from Hugging Face on first run. The pack does not touch ComfyUI's PyTorch, so it does not disturb an existing install.
The author's test on ComfyUI 0.46.0 rendered a 10-second clip in about 9 seconds on an M4 Pro.
Speed
| Where | Render loop | Notes |
|---|---|---|
| M4 Pro, Core ML | 36.5 ms/frame | 25 fps video, real-time weights |
| M3 Pro, Core ML | 39.9 ms/frame | same clip |
| RTX 3050 Ti laptop, TensorRT | ~40 ms/frame | first run builds engines, about 3 minutes |
| Browser, WebGPU | ~245 ms/frame | not real time, nothing to install |
The download is 172.9 MB for Apple's Core ML set or 168 MB for the TensorRT set, and 248 MB for the full-quality renderer.
Availability
- Code and training notes: Ampixa/talkinghead
- Weights: ampixa/talkinghead
- ComfyUI nodes: voidash/ComfyUI-talkinghead
- Browser demo: ampixa.com/talkinghead/demo
- Teacher model: antgroup/ditto-talkinghead
Comments
Sign in with GitHub to join the discussion.