HeyGem对口型
HeyGem lip-sync from inside ComfyUI (without running the model yourself)
- audio
- video_path
- video_url
- task_id
If you want a talking-head video to mouth along to an audio track, HeyGem is one of the better open-source options out there - it's Bilibili's digital-human lip-sync project, and it's genuinely good at keeping the mouth movement tight. The catch is that it's a big, separate GPU service with its own install. LamHeyGemNode doesn't run HeyGem inside ComfyUI's process; it's a client that hands your video and audio to a HeyGem server you've started yourself and waits for the result.
The name is slightly misleading, by the way. The node itself does no inference - it's a glorified HTTP client with a progress bar. All the heavy lifting happens on the HeyGem service at http://localhost:8383 by default. If that service isn't running, this node is useless no matter how well ComfyUI is set up.
How it works
Under the hood it POSTs a job to POST /easy/submit on the server with your audio, your video, and a generated task_id, then polls GET /easy/query?code=<task_id> once a second. Status 1 means it's still processing (that's what drives the ComfyUI progress bar), 2 means done, 0 means it failed and it'll raise the server's error message. When the job completes you get back the output video's path, a web URL, and the task id.
Inputs that matter
- video_path (required) - path to the talking-head video you want re-synced. It's forced-input, so wire it from a video-loading node rather than typing it.
- audio or audio_path - one or the other.
audiotakes an AUDIO tensor from a node (the author's tooltip says they're "二选一" - pick one). If you passaudio_path, it uses that file directly and skips writing a temp wav. - chaofen - a boolean that turns on 超分 (super-resolution upscaling) on the HeyGem side. Leave it off unless you want the slower, higher-res output.
- server - default
http://localhost:8383, tooltip literally says 请勿修改 ("don't modify"). You'll only touch this if you're running HeyGem on a different machine.
Outputs
video_path, video_url, and task_id. Wire video_path or video_url into a preview or save node; keep task_id if you want to check the job later with LamHeyGemQueryNode.
Installing it
This node ships in the ComfyUI_Lam pack, so you're pulling in the whole kitchen sink:
cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam
or search ComfyUI_Lam in ComfyUI Manager. The README is Windows-portable-oriented (it targets the cu121 portable build) and asks you to run install.bat, then 修改文件.bat (Linux: install.sh then 修改文件.sh). That last script patches ComfyUI's core files, so it's worth knowing 还原文件 restores them if you ever remove the pack. Then set up HeyGem separately - it needs its own server listening on port 8383, its own models, and a GPU with real VRAM.
Common issues
The classic failure is "HeyGem processing failed" because the service at localhost:8383 isn't up - start it first, then the node. Next most common: the audio and video paths aren't readable by the HeyGem server, especially if it runs as a different user or in a container. And remember chaofen off by default; people assume it's on and wonder why output isn't as sharp as the HeyGem demo.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| server | STRING | http://localhost:8383 | 请勿修改 |
| video_path | STRING | — | |
| audioopt | AUDIO | — | |
| audio_pathopt | STRING | 与audio参数二选一 | |
| chaofenopt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | — |
| video_url | STRING | — |
| task_id | STRING | — |