ComfyUI-LatentSyncWrapper
Run ComfyUI Easily with InstaSD
Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
Documentation
ComfyUI-LatentSyncWrapper
Overview
The ComfyUI-LatentSyncWrapper repository provides an implementation of the LatentSync 1.6 model for ComfyUI, enhancing video lip-sync capabilities by synchronizing lip movements with audio inputs. The repository focuses on improving clarity and resolution in lip-sync outputs, resolving issues seen in previous versions. The node is particularly useful for creating high-quality video outputs where precise lip-syncing is required.
Installation
Prerequisites
Before installing the ComfyUI-LatentSyncWrapper, ensure that you have the following software and tools installed:
- ComfyUI: Make sure you have ComfyUI installed and working correctly. You can find it here.
- FFmpeg: Install FFmpeg on your system. For Windows, you can download it here and add it to your system PATH.
Installing the Node
Follow these steps to install the ComfyUI-LatentSyncWrapper:
-
Navigate to your
ComfyUI/custom_nodesdirectory.cd ComfyUI/custom_nodes -
Clone the repository into the
custom_nodesdirectory.git clone https://github.com/ShmuelRonen/ComfyUI-LatentSyncWrapper.git -
Move into the repository directory and install the required dependencies.
cd ComfyUI-LatentSyncWrapper pip install -r requirements.txt
Manual Model Downloads
To use this node, you must manually download certain models, as the LatentSync 1.6 models are on a private HuggingFace repository that cannot be accessed automatically.
Option 1: Complete Checkpoints Package (Recommended)
-
Download the complete pre-configured checkpoints folder via Google Drive:
-
Extract the archive to retrieve the complete
checkpointsdirectory. -
Replace or merge it with your existing
checkpointsfolder in the extension directory.
Option 2: Manual Individual Downloads
If preferred, download models individually by following these steps:
-
VAE Model Download
-
Create a
vaefolder inside yourcheckpointsdirectory:mkdir checkpoints/vae -
Visit this HuggingFace page and download
diffusion_pytorch_model.safetensorsandconfig.json. -
Place the downloaded files inside the
checkpoints/vae/folder.
-
-
LatentSync 1.6 Checkpoints Download
-
Ensure you have access to the ByteDance/LatentSync-1.6 HuggingFace repository.
-
Download all files from the repository and place them directly in the
checkpoints/folder.
-
After downloading models, your checkpoint directory should look like:
./checkpoints/
|-- .cache/
|-- auxiliary/
|-- vae/
| |-- config.json
| `-- diffusion_pytorch_model.safetensors
|-- whisper/
| `-- tiny.pt
|-- config.json
|-- latentsync_unet.pt
|-- stable_syncnet.pt
Node Descriptions
This repository provides the following nodes:
LatentSyncNode
The LatentSyncNode is responsible for synchronizing video lips with audio inputs with high clarity and resolution.
VideoLengthAdjuster
The VideoLengthAdjuster is used to adjust the video length to ensure smooth synchronization.
Features and Capabilities
- Enhanced Resolution Training: Trained on 512×512 resolution videos for improved detail, especially in teeth and lips.
- Improved Visual Quality: Addresses blurriness issues seen in previous versions, enhancing the clarity of outputs.
- Backward Compatibility: Works with both LatentSync 1.5 and 1.6, requiring only checkpoint changes.
- Reduced VRAM Requirements: Compatible with GPUs with 20GB VRAM, such as RTX 3090.
- Flexibility: Allows for adjustments in lip movement intensity and inference steps to balance quality and speed.
- Language Support: Improved support for Chinese language videos.
Usage in ComfyUI Workflows
The ComfyUI-LatentSyncWrapper can be integrated into workflows to produce high-quality lip-synced videos. Here’s how it might be used:
- Video and Audio Selection: Use ComfyUI’s video and audio loader nodes to select the input files.
- Parameter Adjustments: Adjust parameters such as
lips_expressionandinference_stepsto suit the specific requirements of the project. - Processing: Connect to the
LatentSync1.6node and execute the workflow to obtain the processed video output. - Output: The processed video will be saved in ComfyUI's output directory, ready for further use.
This repository is particularly useful for projects requiring precise lip-syncing and high-quality video outputs, such as presentations, video content creation, and more.