High-quality lip-sync video generation using LatentSync.
Source: screencastgen/providers/lipsync/latentsync_provider.py
Generates lip-synced face videos by running LatentSync in a subprocess. Supports quality presets and manages session caching for performance.
LatentSyncPreset (Dataclass)| Preset | Resolution | Description |
|---|---|---|
small |
256px | Fast, suitable for small face overlays |
quality |
512px | High quality, larger face overlays |
Each preset specifies:
config_candidates — Config file paths to searchcheckpoint_candidates — Model checkpoint pathsguidance_scale — Diffusion guidance scaleinference_steps — Number of inference stepsrun_latentsync(video_path, audio_path, output_path, device="auto", preset="quality")latentsync_worker.py)download_latentsync_checkpoints(args)Downloads LatentSync model checkpoints. Called by Models.
Finds the LatentSync root directory by:
LATENTSYNC_ROOT environment variableLatentSync Provider
├── latentsync (external installation)
├── subprocess (worker process)
├── TTS Base (resolve_device)
└──▶ registered in Lipsync Registry
└──▶ called by Lipsync Facade