ComfyUI-LatentSync-Node
builds upon the groundwork laid by ComfyUI-LatentSyncWrapper, itself a brilliant implementation of the groundbreaking LatentSync code, adapted for the world of ComfyUI on Windows. We've taken that inspiration and pushed it further to give you the power you crave with high resolution output.
ComfyUI-LatentSync-Node.mp4
Tired of boring A.I. characters that can't speak and lifeless A.I. videos? Prepare to witness a revolution in digital expression! ComfyUI-LatentSync-Node is here to empower you to bring your wildest creative visions to life, right on your local machine.
This isn't just another node; it's a gateway to perfectly synchronized lip movements, breathing life into any video you create within the powerful ComfyUI environment. Using ByteDance's cutting-edge LatentSync model, you can effortlessly make anyone say anything, with uncanny accuracy.
- Effortless Lip-Sync Magic: Seamlessly match the lip movements of your videos to any audio input.
- High-Resolution Brilliance: Experience jaw-dropping, high-resolution lip-sync results that will elevate your projects to a new level.
- Unleash Your Inner Director: Craft scenarios where any character can deliver your dialogue with lifelike precision.
- Voice Your Vision: Use your own voice for personalized narratives, or explore the endless possibilities of voice cloning with F4-TTS. We highly recommend using Pinokio to set up F5-TTS with ease.
Imagine creating:
- Dynamic characters that express the full range of human emotions.
- Personalized videos where your own voice is brought to life in stunning visuals.
- Storytelling experiences that push the boundaries of what's possible.
- High Resolution Output that give you the power to create clear lip-Sync videos.
This isn't just about syncing lips; it's about unlocking a new dimension of creative expression. Stop dreaming about what could be and start creating the impossible.
Zombie | Jesus |
zombie.mp4 |
jesus.mp4 |
Ready to transform your projects? Dive into ComfyUI-LatentSync-Node
today and let your voice be heard!
Before installing this node, you must install the following in order:
What Your Computer Needs:
-
NVIDIA Graphics Card: At least 8GB memory (newer models work best).
-
CUDA Toolkit 11.8 (fancy software to make it run faster).
3.Windows 10 or 11.
4.16GB RAM (for best results). -
ComfyUI installed and working with Python 3.8-3.11
-
Python 3.8-3.11 (mediapipe is not yet compatible with Python 3.12)
-
FFmpeg installed on your system:
- Windows: Download from here and add to system PATH
-
If you get PYTHONPATH errors:
- Make sure Python is in your system PATH
- Try running ComfyUI as administrator
Only proceed with installation after confirming all prerequisites are installed and working.
- Clone this repository into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/ShmuelRonen/ComfyUI-LatentSyncWrapper.git
cd ComfyUI-LatentSyncWrapper
pip install -r requirements.txt
diffusers
transformers
huggingface-hub
omegaconf
einops
opencv-python
mediapipe>=0.10.8
face-alignment
decord
ffmpeg-python
safetensors
soundfile
The models can be obtained in two ways:
The node will attempt to automatically download required model files from HuggingFace on first use. If automatic download fails, use Option 2.
- Visit the HuggingFace repo: https://huggingface.co/chunyu-li/LatentSync
- Download these files:
latentsync_unet.pt
whisper/tiny.pt
- Place them in the following structure:
ComfyUI/custom_nodes/ComfyUI-LatentSyncWrapper/checkpoints/
βββ latentsync_unet.pt
βββ whisper/
βββ tiny.pt
- Select an input video file
- Load an audio file using ComfyUI audio loader
- (Optional) Set a seed value for reproducible results
- Connect to the LatentSync node
- Run the workflow
The processed video will be saved in ComfyUI's output directory.
video_path
: Path to input video fileaudio
: Audio input from AceNodes audio loaderseed
: Random seed for reproducible results (default: 1247)
- Works best with clear, frontal face videos
- Currently does not support anime/cartoon faces
- Video should be at 25 FPS (will be automatically converted)
- Face should be visible throughout the video
How A.I. Face Swap Works and Key to Understanding A.I. face Rotations and its Limits (click image to watch video)
click image to watch video Roop Deep Fake Course
A complementary node that helps manage video length and synchronization with audio.
- Displays video and audio duration information
- Three modes of operation:
normal
: Passes through video frames with added padding to prevent frame losspingpong
: Creates a forward-backward loop of the video sequenceloop_to_audio
: Extends video by repeating frames to match audio duration
- Place the Video Length Adjuster between your video input and the LatentSync node
- Connect audio to both the Video Length Adjuster and Video Combine nodes
- Select desired mode based on your needs:
- Use
normal
for standard lip-sync - Use
pingpong
for back-and-forth animation - Use
loop_to_audio
to match longer audio durations
- Use
- Load Video (Upload) β Video frames output
- Load Audio β Audio output
- Connect both to Video Length Adjuster
- Video Length Adjuster β LatentSync Node
- LatentSync Node + Original Audio β Video Combine
If you encounter mediapipe installation errors:
- Ensure you're using Python 3.8-3.11 (Check with
python --version
) - If using Python 3.12, you'll need to downgrade to a compatible version
- Try installing mediapipe separately first:
pip install mediapipe>=0.10.8
This is an unofficial implementation based on:
- LatentSync by ByteDance Research
- ComfyUI
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.