r/StableDiffusion • • 4d ago

Animation - Video Talkinghead: real-time lip sync tool that's just ~170 MB. One photo, any voice, open source

Tiny alternative to wav2lip, LatentSync and SadTalker. I'm one of the people involved in building this project.

learn more: https://github.com/Ampixa/talkinghead

  • ~170 MB download
  • Render loop: 36.5 ms per frame on an M4 Pro, 38-40 on an M3 Pro. You need 40ms per frame to be real time. An RTX 3050 Ti laptop with 4 GB (TensorRT) runs at 40-44 ms, around real time.
  • Peak memory is under 800 MB on mac book
  • Runs offline. There's also a browser version (WebGPU), but that one is not real time: about a minute for a 10 s clip.

On one RTX 4090: ~13x faster than LatentSync with ~12x less GPU memory (measured on an earlier build; the README has the details). LatentSync and Wav2Lip score higher on SyncNet lip-sync confidence; that's the trade.

Not tested on M1/M2 or systems yet; numbers welcome.

Weights: https://huggingface.co/ampixa/talkinghead

Browser demo: https://ampixa.com/talkinghead/demo

115 Upvotes

19 comments sorted by

6

u/AmayaSenku 4d ago

how does it differ from sad talker which was available since 2022?

6

u/Affectionate_Hat_585 3d ago

SadTalker peak GPU memory is higher than talking head. Time per frame when measured on 4090 is ~80ms and ours is 43ms About 1.7x times faster than 2.3x less gpu memory

And sad talker full official download is 2.5gb whereas talkinghead is just 168 mb for NVIDIA

3

u/onixtan 4d ago

Is it heart's voice from kokoro? i'm 90% sure lol

awesome work btw!

2

u/Affectionate_Hat_585 4d ago

yes it's heart from kokoro

2

u/bsenftner 4d ago

I just see a lot of errors from the Browser demo...

1

u/Affectionate_Hat_585 3d ago

can you send in the exact logs? And your machine specs. Because it relies on your computer completely, it might not be usable as it is on every machine.

2

u/Synchronauto 4d ago edited 4d ago

This is great, thank you. Any way to run this in ComfyUI?

2

u/Affectionate_Hat_585 3d ago

working on a comfyUI node

1

u/Synchronauto 3d ago

That's great, thank you. Also your .pt files, if you could release them in .safetensors it would be much better so users know they're not exposing themselves to malware.

2

u/Comfortablebro 3d ago

why you say alternateive to sad talker, latentsync... isnt this alternative to chatterbox? if no, then what are the differences? thanks if you have time to explain

1

u/Affectionate_Hat_585 3d ago

isn't chatterbox text to speech system? This is more on wav2lip territory. you provide (audio and image) it converts it into a video that has image doing lip sync to audio

1

u/Comfortablebro 2d ago

yes it is text to speech. I assumed this program you made post is also text to speech but for real time lip sync image. We need such technology! That be dope.

4

u/Acceptable-Cycle4645 3d ago

TalkingHead now supports streaming audio input in audio.cpp: feed audio chunks as they arrive and receive animated video frames before the audio finishes. It can keep animating as more audio arrives, without needing the complete recording upfront. https://huggingface.co/audio-cpp/TalkingHead-GGUF If you find this useful, please star audio.cpp on Github!

1

u/UAAgency 4d ago

Very cool, good job!

2

u/Occsan 3d ago

Imagine this + a real time tts + some fast LLM in a game.

1

u/solamentetuyque 2d ago

4 windows anytime soon?

1

u/Affectionate_Rub9491 1d ago

Is there an easy comfyui workflow i can use to demo this locally? Thanks in advance! :)