Comfyui-Kling-Wrapper Video Extender
Keep a Kling clip going — extend instead of restarting
- url
- video_id
Video generation has a hard truth baked into it: clips are short, and the second take rarely matches the first. When a Kling render nails the first five seconds but you need ten, you don't want to re-roll the whole thing and hope. Comfyui-Kling-Wrapper Video Extender is the node for that. You feed it an existing video's ID plus a continuation prompt, and Kling's /v1/videos/video-extend endpoint generates what happens next, preserving the look and motion of what you already have.
The useful mental model is chaining, not single use. Generate a clip, extend it, then feed the new video_id back in and extend again. The pack ships 10_comfyui_kling_wrapper_video_extend_chain.json showing exactly this loop. Each extension continues from the previous result rather than restarting, which is how you build a longer, consistent piece out of a short generator.
How it works
Two required inputs, that's the whole node:
- video_id - the ID of a video already sitting on Kling's side. You get it from the
video_idoutput ofText2Video,Image2Video,Multi Images To Video, or from a previous extension. It has to be a Kling-hosted video, not just any file. - prompt - what should happen next. Describe the continuation as if you're directing a scene: new action, camera intent, where things go from here.
The node submits the task, polls until it's done, and returns url (the extended clip's URL) and video_id (its new ID, ready for the next hop). It's marked as an output node, so it can sit at the end of a branch, but you'll usually chain it - the output video_id is the entire point.
The provider catch
Which backend you configured in config.local.json decides whether this node works at all. The vapeur provider supports video extension and routes it through its own backend. The official Kling provider handles it natively. But if you're on tencent_vod, the node flat-out raises: "Tencent VOD provider does not support Video Extend through this node." Don't fight it - switch provider in config, or use a different node for the Tencent flow.
Installing it
Same pack install as everything else in this wrapper:
cd ComfyUI/custom_nodes
git clone https://github.com/magicwang1111/Comfyui-Kling-Wrapper.git
cd Comfyui-Kling-Wrapper
pip install -r requirements.txt
Or install via ComfyUI Manager by searching "Comfyui-Kling-Wrapper". Create config.local.json in the repo root with your Kling API credentials and restart ComfyUI. No local models involved - each extension is a paid cloud generation.
Common issues
- "But I have a URL, not an ID" - the node only accepts
video_id, so generate or load your source through the pack's other nodes first. There's no URL input here, unlikeVideo2Audio. - Tencent VOD provider - unsupported for this node. Check
provider_defaultinconfig.local.json. - Continuation drift - extensions can drift from the source if your prompt contradicts what's on screen. Keep the prompt consistent with the established scene and motion, and extend incrementally (short hops) rather than asking for a huge change in one go.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video_id | STRING | — | |
| prompt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| url | STRING | — |
| video_id | STRING | — |