Comfyui-Kling-Wrapper Lip Sync
The node that makes Kling videos actually talk
- input
- video_input
- video_frames
- video_info
- url
- video_id
This is the payoff node of the pack. Lip Sync takes a video of a person and an audio track of someone speaking, and re-renders the mouth to match the words. It's Kling's advanced lip-sync endpoint - actually two endpoints - and it's the reason most people install a Kling wrapper at all: generated video is only half the job, and making it talk is the other half.
The flow is: first /v1/videos/identify-face finds faces in your clip and picks one, then /v1/videos/advanced-lip-sync animates that face to the audio. Two calls, one node, billed like the work that it is.
The two inputs
input - a COMFYUI_KLING_WRAPPER_LIPSYNC_INPUT object, which is exactly what this pack's other two lip-sync nodes produce. There are two flavors:
- Lip Sync Audio Input - when you already have an audio file or track to sync to
- Lip Sync Text Input - when you just have text, and want Kling's TTS to speak it first
So the chain is always: an Input node → this Lip Sync node.
face_id - a string, default empty. The README's guidance is refreshingly practical: leave it empty to use the first detected face. If the clip has multiple faces, run the identify step and you'll get face IDs back; enter the one you want explicitly. If you enter a face_id that wasn't returned, the node errors out with the available IDs, which is a much better failure mode than guessing.
The video input
The video to lip-sync onto can arrive several ways:
video_id- a Kling video ID from a previous generationvideo_url- a public http(s) URLvideo_file- a local pathvideo_input- aVIDEOconnectionvideo_frames+video_info- decoded frames plus timing metadata, i.e. theVHS_LoadVideopattern the README recommends
The timing controls
These are the settings people actually tweak:
sound_insert_time_ms- where in the video the speech starts (default 0). The inserted audio must overlap the face's visible interval by at least 2 seconds, or the node rejects it.sound_volume- loudness of the new speech (0–2, default 1).original_audio_volume- loudness of the clip's pre-existing audio (0–2, default 1). Turn this down if the original track has music you want to duck under the dialogue.
Outputs are url and video_id for the synced clip, wired into Preview Video as usual.
Install and gotchas
Standard pack install: ComfyUI Manager (search "Comfyui-Kling-Wrapper") or git clone https://github.com/magicwang1111/Comfyui-Kling-Wrapper.git into custom_nodes, pip install -r requirements.txt, restart, key in config.local.json. API node - the "render" happens on Kling's side, and lip-sync runs are metered.
The gotcha that bites most people: audio and face overlap. The synced audio has to overlap the detected face's on-screen interval by at least two seconds, and the trimmed audio itself must be between 2 and 60 seconds. If you're syncing a 3-second soundbite onto a video where the face appears at second 8, you'll get a rejection - trim the clip or shift sound_insert_time_ms. Also remember that a custom cloned voice can't be sent through the TTS path in this pack (that "Voice id not found" wall again) - if you want a cloned voice, generate audio externally and feed it through Lip Sync Audio Input.
For most talking-video needs, this node is the entire pipeline: video in, audio in, a speaking clip out. It's the node that turns a good Kling render into something you'd actually publish.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| input | COMFYUI_KLING_WRAPPER_LIPSYNC_INPUT | — | |
| face_id | STRING | — | |
| video_idopt | STRING | — | |
| video_urlopt | STRING | — | |
| video_fileopt | STRING | — | |
| video_inputopt | VIDEO | — | |
| video_framesopt | IMAGE | — | |
| video_infoopt | VHS_VIDEOINFO | — | |
| sound_insert_time_msopt | INT | 00–60000 | — |
| sound_volumeopt | FLOAT | 1.00–2 | — |
| original_audio_volumeopt | FLOAT | 1.00–2 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| url | STRING | — |
| video_id | STRING | — |