Kling 多镜头分镜脚本
Storyboard a multi-shot video before you generate it
- 分镜脚本
Kling 多镜头分镜脚本 (multi-shot storyboard script) is the quietest node in this pack: it makes no API call, generates nothing, and spends zero credits. Its entire job is to assemble the shot list that Kling's multi-shot text-to-video mode eats for breakfast. You write up to six shot descriptions with per-shot durations, and it hands KlingText2Video a tidy KLING_MULTI_SHOT object instead of one long, undirected prompt.
Why bother? Because one continuous prompt that tries to describe a full scene sequence is how you get a video where the model commits to its own story and there's nothing you can do about it. Splitting the job into shots - "wide establishing shot, 3s," "close-up on the character, 4s," - gives Kling a beat sheet, and beats are the difference between "a video happened" and "a scene was directed." This is the closest this pack gets to a pre-production tool, and it costs you nothing to use it.
How it works
It's a pure data-builder. Each shot pair - 镜头N提示词 (shot N prompt) and 镜头N时长 (shot N duration) - becomes a dict in a Python list: {"index": n, "prompt": "...", "duration": "..."}. Empty prompts are dropped, and indices are assigned automatically, so you don't have to renumber when you cut a shot. The README says four shots, but the code actually supports six (镜头1 through 镜头6) - the README is just behind. Trust the node.
The output, 分镜脚本 (storyboard script, type KLING_MULTI_SHOT), plugs into the 分镜脚本 input of Kling 文本到视频 (text-to-video), where you then set 多镜头 (multi-shot) = True and 分镜方式 (shot type) = customize. Leave the shot type on intelligence and Kling writes its own shots from a single prompt instead - this node is for when you want to be the one in charge.
The inputs that matter
- 镜头1提示词 (Shot 1 prompt) and 镜头1时长 (Shot 1 duration, 1–15s) - the only required pair. A single-shot script is legal; it just won't be multi-anything.
- 镜头2–6 提示词 / 时长 - optional. Fill as many as you need. Shots with an empty prompt are silently ignored.
That's the whole surface. No token, no mode, no watermark - all of that lives on the generation node this feeds.
Install
Pack-wide, nothing special:
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 requests and PyJWT only.
Gotchas
- This node alone does nothing. The output is meaningless without the KlingText2Video node - wire
分镜脚本into its matching input and flip 多镜头 tocustomize. If you've installed the pack and this node "doesn't do anything," that's expected; it's a config object, not a generator. - Duration per shot, not per video. The shot durations are what the API reads; if you want a 10-second result, distribute that across shots. There's no "total length" field here.
- The fields are in Chinese (镜头 = shot, 提示词 = prompt, 时长 = duration), so map the labels once and they're intuitive from then on.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| 镜头1提示词 | STRING | — | |
| 镜头1时长 | INT | 31–15 | — |
| 镜头2提示词opt | STRING | — | |
| 镜头2时长opt | INT | 31–15 | — |
| 镜头3提示词opt | STRING | — | |
| 镜头3时长opt | INT | 31–15 | — |
| 镜头4提示词opt | STRING | — | |
| 镜头4时长opt | INT | 31–15 | — |
| 镜头5提示词opt | STRING | — | |
| 镜头5时长opt | INT | 31–15 | — |
| 镜头6提示词opt | STRING | — | |
| 镜头6时长opt | INT | 31–15 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 分镜脚本 | KLING_MULTI_SHOT | — |