This repository provides a serverless-ready and local-capable deployment of ByteDance’s LatentSync 1.6 lip-sync model. It supports explicit environment selection for local, staging, and production deployments. This system was ran and tested on Nvidia RTX 3090 and A40 and consumed ~19 GB video ram
- Serverless GPU inference (RunPod compatible)
- Explicit environment selection (
local,stag,prod) - Dockerized CUDA environment
- Preloaded models (UNet, Whisper, VAE, InsightFace)
- No runtime model downloads
- Global pipeline reuse
- Clean runtime cleanup & GPU memory handling
actor_5.mp4
video3.mp4
Important: The
levelfield is mandatory for all runs.
{
"level": "local",
"ref_video_path": "/absolute/path/to/video.mp4",
"ref_audio_path": "/absolute/path/to/audio.wav"
}- Uses local filesystem
- No cloud credentials required
- Intended for development and debugging only
{
"level": "stag",
"ref_video_path": "s3://staging-bucket/path/video.mp4",
"ref_audio_path": "s3://staging-bucket/path/audio.wav"
}- Uses staging AWS resources
- Separate credentials and buckets
- Mirrors production setup safely
{
"level": "prod",
"ref_video_path": "s3://production-bucket/path/video.mp4",
"ref_audio_path": "s3://production-bucket/path/audio.wav"
}- Uses production AWS infrastructure
- Strict access and IAM policies
- Intended for live workloads
{
"aleef": true
}Returns service metadata without running inference.
.
├── app.py
├── Dockerfile
├── requirements.txt
├── utils/
├── LatentSync/
├── checkpoints/
└── test_input.json
docker build -t latentsync-lipsync-serverless .All models are preloaded at build time, ensuring fully offline runtime execution.
- Python 3.10
- PyTorch (CUDA)
- Diffusers
- LatentSync 1.6
- Whisper
- InsightFace
- RunPod Serverless
- AWS S3
- Temp files created in
/tmp - GPU memory cleared after each job
- Global pipeline reused across warm invocations
- LatentSync: Apache 2.0
- Other dependencies follow upstream licenses
✔ Local, staging, and production modes supported ✔ Serverless Docker image deployed ✔ Models preloaded and locked
🙏 Acknowledgement
Special thanks and sincere appreciation to the ByteDance LatentSync team for their outstanding work on this model. This deployment builds upon their research and engineering excellence, and we acknowledge their contribution with deep respect and gratitude.