Kling 文本到视频
Kling Omni video from inside ComfyUI
- 分镜脚本
- video_url
This is the flagship of the ComfyUI-KLingAI-OmniVideo pack: type a prompt, get a video. No model download, no GPU at all - KlingText2Video wraps Kling AI's kling-video-o1 text-to-video API so the whole thing looks like an ordinary ComfyUI node. For anyone who has watched local video generation eat a 24GB card and still deliver shaky hands, "the cloud just did it" has a real appeal. The tradeoff is that every run is a metered API call that costs real money, and your prompt goes to Kuaishou's servers. It's an API wrapper node, not a sampler - make peace with that before you install.
The node has drifted across versions (one build returned decoded frames directly; the current schema returns a URL), so if your installed copy shows different field labels than below, that's the pack evolving, not you going mad. Here's the version comfy.icu currently documents - note the fields are labeled in Chinese.
How it works
Under the hood it's a small HTTP client with a JWT baked in. The pack signs your Kling access/secret keys into a short-lived token (pyjwt, 30-minute expiry), posts a payload to /v1/videos/omni-video, then polls the task until Kling reports success, failure, or your timeout runs out. When it succeeds you get the URL of the finished clip. Nothing runs on your machine except the code that talks to Kling and downloads the result - which is why the node has a 等待超时秒 (wait timeout) knob rather than a "steps" knob.
The inputs that matter
Required:
- 提示词 (prompt) - your text prompt, multiline. This is the whole show; write the motion, the camera, the mood.
- 模式 (mode) -
pro,std, or4k. Higher tier, higher cost and longer queue.stdis fine for drafts. - 时长 (duration) - 3–15 seconds.
- 画面比例 (aspect ratio) - 16:9, 9:16, or 1:1.
Optional, and worth knowing they exist even if you ignore them at first:
- 模型名称 (model name) -
kling-video-o1orkling-v3-omni. - 声音 (sound) -
onoroff. Kling Omni can produce audio, not just silent video. - 多镜头 (multi-shot) - toggle, with 分镜方式 (storyboard mode) set to
intelligenceorcustomizeand 分镜脚本 (storyboard script) if you want Kling to follow a shot list. - 添加水印 (watermark) - turn the baked-in watermark on or off.
- API令牌 (API token) - override the credential from
config.iniper-call, if you have one. - 回调地址 (callback URL) and 自定义任务ID (custom task ID) - async niceties for people automating; skip them.
- 等待超时秒 (wait timeout) - 60–1800s, default 600. Raise it if long generations keep timing out.
Output
Just one: video_url (STRING). It's a link to the rendered clip. You'll want to feed it into a video-loader node to pull the frames back into the graph, or just open it in a browser. Remember the pack also ships siblings (KlingFirstEndFrame, KlingVideoExtend) if you want image or continuation control instead of pure text-to-video.
Install and config
Same story as every node in this pack. In ComfyUI Manager search "ComfyUI-KLingAI-OmniVideo", or:
cd ComfyUI/custom_nodes
git clone https://github.com/starsFriday/ComfyUI-KLingAI-OmniVideo.git
cd ComfyUI-KLingAI-OmniVideo
pip install -r requirements.txt
Then restart. Dependencies are oss2, requests, pyjwt, imageio[ffmpeg], numpy, torch. The part nobody reads until it breaks: create config.ini in the pack folder with your Kling API keys, and - because the image-reference sibling nodes upload inputs through it - an Aliyun OSS bucket configured public-read. For plain text-to-video you technically only need the Kling keys.
Common issues
- "Task failed" - wrong keys in
config.ini, or an empty account balance. Video jobs are the fast way to burn through a balance, so check that before you blame the node. - Timeouts - long or 4k jobs exceed the default 600s wait. Raise 等待超时秒.
- Input rejection - the API enforces its own limits: input videos ≤10s and each side 720–2560px.
- Cost surprises - the community's standard complaint about every API-node pack, and it applies here in full. Keep
std, short durations, and drafts in the loop rather than paying for every experiment.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| 提示词 | 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 | |
| 声音opt | COMBO | off | 2 options: off, on |
| 多镜头opt | BOOLEAN | false | — |
| 分镜方式opt | COMBO | intelligence | 2 options: intelligence, customize |
| 分镜脚本opt | KLING_MULTI_SHOT | — | |
| 添加水印opt | BOOLEAN | false | — |
| 回调地址opt | STRING | — | |
| 自定义任务IDopt | STRING | — | |
| 等待超时秒opt | INT | 60060–1800 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |