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

Kling 视频到视频

Borrow a clip's motion, direct your own video

By awsl1110·Created 5 months ago·Updated 5 months ago· 0
Kling 视频到视频
    • video_url
    提示词参考<<<video_1>>>的运镜方式,生成一段视频
    视频URL
    模式
    时长5
    画面比例16:9
    API令牌
    模型名称
    保留原声yes
    参考图1
    参考图2
    参考图3
    参考图4
    元素ID列表
    添加水印false
    回调地址
    自定义任务ID
    等待超时秒600

    Kling 视频到视频 (video-to-video) is the feature-reference node. Give it a video URL and it doesn't edit that video - it borrows from it. The default prompt says it all: 参考<<<video_1>>>的运镜方式,生成一段视频 - "reference video_1's camera movement and generate a video." The output is a brand-new clip with its own subject and content, animated with the motion, direction, and general vibe of your reference. Think of it as motion transfer with an optional character on top.

    Where does that get you? Two places, mostly. You have a reference clip whose camera work you love and you want a different subject performing the same moves - that's the flagship use. Or you're extending a series and want every clip to share a consistent motion signature. The usual workflow is: source a short clip (a screen recording, a scene from something you're allowed to use, a clip you made locally), drop its URL here, write a fresh prompt, and Kling does the rest.

    How it works

    Another OmniVideo API wrapper, same shape as the others: POST a payload to api-beijing.klingai.com/v1/videos/omni-video, poll until succeed, get a URL back. The difference is in the payload: your video goes into video_list tagged refer_type: "feature" (as opposed to "base", which is what the edit node uses), alongside keep_original_sound. You can also attach up to four 参考图 (reference images) and reference them in the prompt with <<<image_N>>>, or pass platform element IDs via 元素ID列表.

    Two structural constraints worth knowing, straight from the code: the API forces sound off whenever a source video is present, and duration is capped at 10 seconds here (not 15 like the text/image nodes). The 保留原声 toggle controls whether the original audio is carried through, not whether audio is generated.

    The inputs that matter

    • 提示词 (Prompt) - required. Describe the new content; use <<<video_1>>> to gesture at the reference clip.
    • 视频URL (Video URL) - required. A public URL to your reference video.
    • 模式 (Mode) - pro / std / 4k.
    • 时长 (Duration) - 3–10 seconds (notice the lower ceiling), default 5.
    • 画面比例 (Aspect ratio) - 16:9 / 9:16 / 1:1.
    • API令牌 (API token) - the api_token from a Kling Auth node. Required in practice; the pack errors with api_token is required if you skip it.
    • 保留原声 (Keep original sound) - yes / no, default yes.

    Output: video_url (STRING) → usually into Kling 下载视频 for a real VIDEO object.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/awsl1110/ComfyUI-KlingAI
    pip install -r ComfyUI-KlingAI/requirements.txt
    

    Restart ComfyUI, or ComfyUI Manager → "ComfyUI-KlingAI". requests + PyJWT only; nothing runs locally.

    Gotchas

    • Your reference video must be a public URL - the cloud fetches it itself. Local paths produce an empty or broken reference.
    • Don't expect a long result. 10 seconds is the hard cap, and the closer you get, the more credits and the longer the wait. Iterate at 5.
    • Sound behaves in a way that surprises people: the API turns it off whenever there's a source video, so this node never generates a soundtrack, and 保留原声=yes just means the original audio (if any) is preserved.
    • The reference clip leaves your machine and lands on Kuaishou's servers - same privacy trade as the whole pack. Keep references you're comfortable being hosted.
    CategoryKlingAI

    Inputs (17)

    NameTypeDefaultDescription
    提示词STRING参考<<<video_1>>>的运镜方式,生成一段视频
    视频URLSTRING
    模式COMBO3 options: pro, std, 4k
    时长INT53–10
    画面比例COMBO16:93 options: 16:9, 9:16, 1:1
    API令牌optSTRING
    模型名称optCOMBO2 options: kling-video-o1, kling-v3-omni
    保留原声optCOMBOyes2 options: yes, no
    参考图1optSTRING
    参考图2optSTRING
    参考图3optSTRING
    参考图4optSTRING
    元素ID列表optSTRING
    添加水印optBOOLEANfalse
    回调地址optSTRING
    自定义任务IDoptSTRING
    等待超时秒optINT60060–1800

    Outputs (1)

    NameTypeDescription
    video_urlSTRING