Extensions/Vidlamp Lip Sync
ComfyUI Extension

Vidlamp Lip Sync

Lip sync for ComfyUI: a video with a person + any audio - the same video saying that audio. Only the mouth area changes, the rest of every frame stays the original pixel. LatentSync 1.6 / 1.5, face found with MediaPipe, no ffmpeg needed.

By Stefanobeck·Created about 20 hours ago·Updated about 19 hours ago· 0
Stefanobeck/ComfyUI-Vidlamp-LipSync
Nodes—
On cloudLocal install
Stars0
Updatedabout 19 hours ago
Readme

Vidlamp Lip Sync (ComfyUI)

Part of Vidlamp, the free app that turns ComfyUI into a simple studio for images, videos, music and voices. These nodes work in any ComfyUI, with or without Vidlamp.

A video with a person + any audio -> the same video with the mouth saying that audio.

  • Only the mouth area changes. Every other pixel of every frame is the original one: no loss of quality on the rest of the video.
  • No re-compression: frames go in and out as ComfyUI images.
  • Nothing to install by hand: no ffmpeg program needed.
  • Face found with MediaPipe (Apache 2.0), on the CPU.
  • Model: LatentSync 1.6 (12 GB video cards) or 1.5 (8 GB).

Credits: where this comes from

This node stands on other people's work. It is not affiliated with, nor endorsed by, any of them.

  • LatentSync by ByteDance: the lip sync model and its code (Apache 2.0). All the lip sync quality comes from their research. The folders latentsync/ and configs/ are their code, with small changes listed in NOTICE.
  • ComfyUI-LatentSyncEnhanced by GuardSkill (Apache 2.0): our starting point for running LatentSync inside ComfyUI, and the idea of leaving frames without a face untouched.
  • ComfyUI-LatentSyncWrapper by ShmuelRonen: the wrapper that first brought LatentSync to ComfyUI. If you want the full-featured LatentSync nodes, use theirs.
  • Whisper by OpenAI (MIT), MediaPipe Face Landmarker by Google (Apache 2.0), and the alignment code that LatentSync adapted from StyleSync and MuseTalk.

What is ours: pasting back only the mouth area into the original frames, reading the audio without ffmpeg, the MediaPipe face finder, the Face Fix nodes and the live preview. Found a missing credit? Open an issue and we fix it.

Nodes

  • Load Lip Sync Model (Vidlamp)
  • Lip Sync: make the video say this audio (Vidlamp): images + audio -> images, audio, faces (the redrawn face crops, to check the result).
  • Face Fix: find and crop the face (Vidlamp) and Face Fix: put the faces back (Vidlamp): the face is found in every frame and cropped; any model can improve the crops (for example SeedVR2), then only the face, inside its outline, goes back into the original frames. The live preview shows the tracked face.

Models

ComfyUI/models/latentsync/LatentSync-1.6/latentsync_unet.pt      (ByteDance/LatentSync-1.6)
ComfyUI/models/latentsync/LatentSync-1.6/whisper/tiny.pt
ComfyUI/models/latentsync/LatentSync-1.6/vae/config.json + diffusion_pytorch_model.safetensors  (stabilityai/sd-vae-ft-mse)
ComfyUI/models/mediapipe/face_landmarker.task

models/checkpoints/LatentSync-1.6 (the place other LatentSync nodes use) is found too.

About Vidlamp

Vidlamp is a free Windows app that sits on top of ComfyUI and turns it into a simple studio. Each job is a tool with a clear name ("Animate an image", "Edit an image with an instruction", "Upscale and restore") and a short form: you give a photo, write a few words, press Create. Vidlamp builds the workflow, runs it in your own ComfyUI and puts the result in a gallery. Images, videos, music and voices; everything runs on your PC, and your files stay there.

Vidlamp uses these nodes in its lip sync and face tools. We publish the nodes on their own so that anyone can use them in their workflows.

Download Vidlamp · Tutorials on YouTube · Support the project on Patreon

Licenses

Code: Apache 2.0 (see LICENSE and NOTICE, which lists the third-party code file by file). LatentSync weights: OpenRAIL++-M, with its use restrictions.