wav2lip / README.md
Nekochu's picture
Add color for readme
593cca4 verified
---
title: Wav2Lip CPU
emoji: ๐Ÿ‘„
sdk: gradio
sdk_version: 6.3.0
colorFrom: red
colorTo: pink
app_file: app.py
pinned: false
license: mit
---
# Wav2Lip - CPU Lip Sync
> **Based on [saifhassan/Wav2Lip-HD](https://github.com/saifhassan/Wav2Lip-HD)**
>
> CPU-only conversion for HuggingFace Spaces free tier (no GPU required).
## Features
- **ONNX Wav2Lip model** (145MB) - runs on CPU
- **OpenCV face detection** - no GPU needed
- **Mouth-paste approach** - preserves original face quality
- **Temporal smoothing** - reduces face bbox flickering
## How It Works
1. Detect face using OpenCV Haar Cascade
2. Crop and resize to 96x96
3. Run Wav2Lip ONNX inference
4. Extract mouth region from output
5. Scale and paste onto original face
6. Feather blend at seam
## Limitations
- Max 500 frames (~20 seconds at 25fps)
- ~1-2 sec/frame on CPU
- Best with frontal faces
## Credits
- [Wav2Lip](https://github.com/Rudrabha/Wav2Lip) - Original model
- [Wav2Lip-HD](https://github.com/saifhassan/Wav2Lip-HD) - HD approach
- [bluefoxcreation/Wav2lip-Onnx](https://huggingface.co/bluefoxcreation/Wav2lip-Onnx) - ONNX models