Kling Advanced Lip Sync
Lip-Sync That Knows Which Face to Move
- auth
- video
- video_file
- audio
- url
- task_id
Kling Advanced Lip Sync is the upgrade over the pack's plain Lip Sync node: it's face-aware. Before it syncs anything, it runs Kling's face-identification step on the source video, finds the faces in the frame, and then syncs the lips of a specific face you choose - with control over the audio volume. The plain node syncs "the video's audio," full stop. This one asks "which face, and how loud?"
That's the differentiator and the reason it exists: videos with multiple people, or a face that isn't the obvious speaker, are exactly where a dumb lip-sync goes wrong. Point the Advanced node at face index 1 and it moves that person's mouth. It's the right tool whenever you need the sync to be precise rather than just present.
How it works
The flow is two-phase, and the node hides the first phase from you:
- Identify the face. The node calls Kling's face-identification endpoint with your
video_url, gets back a session ID plus a list of detected faces with IDs. - Sync the chosen face. It picks the face at your
face_index, then submits the advanced lip-sync task with that face ID and yourvolume, polls, downloads, and loads the result.
Inputs:
auth- the KLING_AUTH object.video_url- URL of the source video. Note it's a URL, not a tensor - you'll need the video hosted somewhere Kling can fetch it. The pack's Cloud Uploader or a video already online are the usual sources.audio_url- URL of the audio to sync (mp3/wav).face_index- integer, 0..10, default 0. 0 = the first detected face. This is your "which person is talking" dial.volume- integer, 0..100, default 10. Volume of the synced audio. If you find the result quiet, this is the knob.
Outputs: video (IMAGE), video_file (path), audio (AUDIO), url, task_id - the standard video quintet, with video ready for a saver or further processing.
How to get it right
- Count your faces before you set the index. Kling detects faces in the order it finds them; if your video has a clear single subject,
0is safe. With multiple people, you may need to try 0, then 1, until the right mouth moves. The node picksmin(face_index, faces-1), so an out-of-range index silently clamps to the last face - worth knowing if it "always syncs the same person." - Host both media. The URL requirement means your video and audio need to be reachable by Kling. If they're local, run them through the Cloud Uploader first (and mind its public-URL privacy warning - lip-sync clips are exactly the kind of thing you may not want permanently public).
- Volume is the second dial.
volumescales the synced audio; if the speech is buried under the original track, raise it. Don't confuse it withface_index- one picks the face, the other the loudness.
Common issues
- "No faces detected" - the video's subject is too small, occluded, stylized, or off-frame for Kling's detector. Crop or re-record; a clear frontal face is the precondition.
- "returned no session_id" - the identification step failed server-side; usually a bad
video_url(unreachable, wrong scheme, or blocked by the pack's SSRF guard). Check the URL is public and HTTPS. - Wrong person's lips move - you're at the wrong
face_index, or the index clamped. Step through 0..2 to find the target.
Install
Part of ComfyUI-Kling-Direct:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-Kling-Direct
or ComfyUI Manager → search "Kling Direct" → install → restart. No models, no GPU, no extra dependencies - Kling does the face detection and syncing server-side, billed per call. If your lip-sync needs are "one talking head," the plain node is enough; the moment there's a second person in frame, this is the one you want.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| auth | KLING_AUTH | — | |
| video_url | STRING | URL of the source video. | |
| audio_url | STRING | URL of the audio to sync. | |
| face_index | INT | 00–10 | Index of the detected face to sync (0 = first face). |
| volume | INT | 100–100 | Volume of the synced audio (0-100). |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| video | IMAGE | — |
| video_file | STRING | — |
| audio | AUDIO | — |
| url | STRING | — |
| task_id | STRING | — |