Nodes/ComfyUI-KlingAI/Kling 图像到视频
ComfyUI Node

Kling 图像到视频

Up to five reference images, one animated result

By awsl1110·Created 5 months ago·Updated 5 months ago· 0
Kling 图像到视频
    • video_url
    提示词让<<<image_1>>>中的人物向镜头挥手
    参考图1
    模式
    时长5
    画面比例16:9
    API令牌
    模型名称
    参考图2
    参考图3
    参考图4
    参考图5
    元素ID列表
    声音off
    添加水印false
    回调地址
    自定义任务ID
    等待超时秒600

    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_token output 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 required is 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.
    CategoryKlingAI

    Inputs (17)

    NameTypeDefaultDescription
    提示词STRING让<<<image_1>>>中的人物向镜头挥手
    参考图1STRING
    模式COMBO3 options: pro, std, 4k
    时长INT53–15
    画面比例COMBO16:93 options: 16:9, 9:16, 1:1
    API令牌optSTRING
    模型名称optCOMBO2 options: kling-video-o1, kling-v3-omni
    参考图2optSTRING
    参考图3optSTRING
    参考图4optSTRING
    参考图5optSTRING
    元素ID列表optSTRING
    声音optCOMBOoff2 options: off, on
    添加水印optBOOLEANfalse
    回调地址optSTRING
    自定义任务IDoptSTRING
    等待超时秒optINT60060–1800

    Outputs (1)

    NameTypeDescription
    video_urlSTRING