Kling Avatar Generation
Kling avatar generation from one image
- auth
- image
- audio
- video
- video_file
- audio
- url
- task_id
A "digital human" avatar is what Kling calls its talking-head generation: you feed it a single portrait and it produces a video of that person speaking, gesturing, and subtly moving like a real presenter. No motion capture, no video of the subject - one image in, a talking-head clip out. This is the node behind a lot of "AI presenter" content, and it's one of the flashier things this pack can do.
You'd reach for it when you need a person to talk on camera and you only have a still: a news-style anchor, a product spokesperson, a character from a generated portrait. The optional audio input is the magic part - give it a voice (from the Gemini TTS node, a local TTS, or an audio file) and the avatar speaks that audio with matching lip movement. Without audio, you get a silent animated portrait driven by the prompt instead.
How it works
Another asynchronous Kling task. The node uploads your image as a base64 asset, and if you supplied an audio tensor it converts and uploads that as a material asset too (or uses a audio_url directly). Then it submits the avatar job to Kling's image-to-video endpoint with your prompt and mode, polls until the video finishes, downloads it to your output folder, and hands back the video as a tensor, the file path, the extracted audio, the hosted URL, and the task ID.
The mode input (pro vs std) picks the generation tier - pro is the better-quality default; std is cheaper and faster for test runs.
Inputs and outputs that matter
auth- the KLING_AUTH object. Required on every Kling node.image- the portrait to animate. A clean, front-facing, well-lit face gets the best results; the more the image looks like a headshot, the better the avatar.audio- optional AUDIO. The speech the avatar will sync to. This is what makes it a talking head rather than a moving one.audio_url- alternative to the audio tensor: point at a hosted audio URL instead.prompt- optional; guides the animation when there's no audio ("wave slowly and smile").mode-proorstd.
Outputs: video (IMAGE batch - frames of the result), video_file (saved file path), audio (the clip's audio), url (hosted), task_id.
How to install it
Pack-level install:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
cd ComfyUI-API-Toolkit
pip install -r requirements.txt
or "API Toolkit" in ComfyUI Manager. Kling needs requests and PyJWT. The audio path also wants soundfile/scipy from the requirements file.
Common issues
The failure you'll meet most is on the input side: Kling rejects images that are too large or badly proportioned (the client's error map calls this 1101 "invalid image"), and it flags content its policy doesn't like - including, notably, faces of real people if you're using them without authorization. Use a clean, well-cropped portrait and expect the filter to be strict.
Also, this is one of the pricier Kling jobs - avatar video is billed per generation and the pack's API nodes always re-run on Queue, so every run costs. Test with std mode and a short silent clip before spending on the pro pass with a full narration.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| auth | KLING_AUTH | — | |
| image | IMAGE | — | |
| prompt | STRING | Optional text prompt for the avatar animation. | |
| mode | COMBO | pro | Generation mode. |
| audioopt | AUDIO | — | |
| audio_urlopt | STRING | URL of audio for the avatar to speak. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| video | IMAGE | — |
| video_file | STRING | — |
| audio | AUDIO | — |
| url | STRING | — |
| task_id | STRING | — |