Kling 图像到视频
Up to five reference images, one animated result
- video_url
This is the node most people come to this pack for: Kling 图像到视频 (image to video). You hand it a picture - a character render, a photo, whatever you just finished in your local pipeline - and Kling animates it. Its party trick over a plain one-image animator is that it accepts up to five reference images and lets you reference each one by number inside the prompt. You can tell the model "have the person from image_1 walk toward the building in image_2" and mean it.
That's the workflow shape that makes sense of the whole pack: generate a character locally with your own checkpoints, then hand Kling the still to make it move. You keep the local workflow you trust for the frame, and spend credits only where Kling genuinely beats a local video model. Closed model, per-call pricing, no open-weight alternative - the longer version of that argument lives in the closed-source-models notes.
How it works
The node wraps Kuaishou's OmniVideo API. It builds an image_list from whichever of the 参考图1–5 (reference image 1–5) fields you filled - each a {"image_url": ...} - and POSTs it alongside your prompt to api-beijing.klingai.com/v1/videos/omni-video. Then it polls every five seconds until the task is succeed and hands you the first video_url. The <<<image_N>>> placeholders are not parsed locally; they're part of the prompt string the cloud model interprets. sound toggles auto-generated background audio (off/on).
The inputs that matter
- 提示词 (Prompt) - required. Defaults to a Chinese example:
让<<<image_1>>>中的人物向镜头挥手("have the person in image_1 wave at the camera"). Use<<<image_1>>>through<<<image_5>>>to refer to each reference. - 参考图1 (Reference image 1) - required; 参考图2–5 optional. Public URLs, not local files.
- 模式 (Mode) -
pro/std/4k. Std for iterating, pro for the keeper, 4k if you're sure. - 时长 (Duration) - 3–15 seconds, default 5.
- 画面比例 (Aspect ratio) - 16:9 / 9:16 / 1:1, default 16:9.
- API令牌 (API token) - wire in the
api_tokenoutput of Kling Auth, or nothing runs. - 声音 (Sound) -
off(default) /on. On adds a generated ambient track; nice for a demo, annoying when you want to score it yourself.
Output: video_url (STRING), normally fed into Kling 下载视频 to materialize it as a VIDEO.
Install
Same as the pack as a whole - no models, no VRAM:
cd ComfyUI/custom_nodes
git clone https://github.com/awsl1110/ComfyUI-KlingAI
pip install -r ComfyUI-KlingAI/requirements.txt
Restart ComfyUI, or install via ComfyUI Manager (search "ComfyUI-KlingAI"). Dependencies are just requests and PyJWT.
Where people get burned
- Reference images must be URLs the cloud can fetch. A local path silently produces an empty
image_list, and you get a video that ignored every image you "sent." Upload to imgur / your own host / any public URL first. api_token is requiredis the error for forgetting the Kling Auth wiring. Every image-to-video attempt needs that connection.- Everything you upload goes to Kuaishou's servers and stays subject to their moderation and logging. There are real community threads about people who generated client work through a Kling wrapper and then couldn't get the source images deleted afterward. Don't feed it anything you wouldn't want hosted.
- Long clips + busy servers mean the 600s default wait can run out. Bump 等待超时秒 up to 1800 - the task keeps running server-side either way, so it's usually just a matter of polling longer.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| 提示词 | STRING | 让<<<image_1>>>中的人物向镜头挥手 | — |
| 参考图1 | STRING | — | |
| 模式 | COMBO | 3 options: pro, std, 4k | |
| 时长 | INT | 53–15 | — |
| 画面比例 | COMBO | 16:9 | 3 options: 16:9, 9:16, 1:1 |
| API令牌opt | STRING | — | |
| 模型名称opt | COMBO | 2 options: kling-video-o1, kling-v3-omni | |
| 参考图2opt | STRING | — | |
| 参考图3opt | STRING | — | |
| 参考图4opt | STRING | — | |
| 参考图5opt | STRING | — | |
| 元素ID列表opt | STRING | — | |
| 声音opt | COMBO | off | 2 options: off, on |
| 添加水印opt | BOOLEAN | false | — |
| 回调地址opt | STRING | — | |
| 自定义任务IDopt | STRING | — | |
| 等待超时秒opt | INT | 60060–1800 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |