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

Kling 文本到视频

Kling Omni video from inside ComfyUI

By awsl1110·Created 5 months ago·Updated 5 months ago· 0
Kling 文本到视频
  • 分镜脚本
  • video_url
◄提示词►
◄模式▾►
◄时长5►
◄画面比例16:9►
◄API令牌►
◄模型名称▾►
◄声音off►
◄多镜头false►
◄分镜方式intelligence►
◄添加水印false►
◄回调地址►
◄自定义任务ID►
◄等待超时秒600►

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, or 4k. Higher tier, higher cost and longer queue. std is 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-o1 or kling-v3-omni.
  • 声音 (sound) - on or off. Kling Omni can produce audio, not just silent video.
  • 多镜头 (multi-shot) - toggle, with 分镜方式 (storyboard mode) set to intelligence or customize and 分镜脚本 (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.ini per-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.
CategoryKlingAI

Inputs (14)

NameTypeDefaultDescription
提示词STRING—
模式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
声音optCOMBOoff2 options: off, on
多镜头optBOOLEANfalse—
分镜方式optCOMBOintelligence2 options: intelligence, customize
分镜脚本optKLING_MULTI_SHOT—
添加水印optBOOLEANfalse—
回调地址optSTRING—
自定义任务IDoptSTRING—
等待超时秒optINT60060–1800—

Outputs (1)

NameTypeDescription
video_urlSTRING—