Nodes/ComfyUI-JM-KLing-API/KLingAI 混合视频生成
ComfyUI Node

KLingAI 混合视频生成

One node that picks text2video or image2video for you

By juemingai·Created about a year ago·Updated 11 months ago· 3
KLingAI 混合视频生成
  • image
  • image_tail
  • task_id
  • task_status
  • created_at
  • updated_at
  • seed
api_token
positive_prompt
negative_prompt
model_namekling-v1
cfg_scale0.5
modestd
duration5
image_url
image_typeBase64
use_camera_controlfalse
camera_typesimple
camera_horizontal0.0
camera_vertical0.0
camera_pan0.0
camera_tilt0.0
camera_roll0.0
camera_zoom0.0
external_task_id
callback_url
seed-1

Here's the whole pitch in one line: if you give it an image, it calls Kling's image2video API; if you don't, it calls text2video. That's the KLingAI 混合视频生成 node - "hybrid video generation" in the source, a single node that dispatches to whichever video API fits your inputs. Same auth, same async task flow, same five outputs. It exists to save you from maintaining two near-identical nodes and their duplicated wiring.

The display name is Chinese (混合视频生成 = "hybrid video generation"), which is a nice hint about where this pack comes from - it's a small, Chinese-community utility pack, and a few of its nodes read that way.

How it works

Under the hood it's a branch, not a blend. The node checks whether you've provided an image; if yes, it POSTs to /v1/videos/image2video, otherwise to /v1/videos/text2video - the same two endpoints the dedicated nodes hit. Which means you get most of both nodes' capabilities in one widget: a prompt, an optional start image, an optional tail image, camera control, and a model list that covers every KLing model the pack knows (kling-v1, kling-v1-5, kling-v1-6).

Note the model list here is the older three - no kling-v2-* entries. If you want the v2 family, use the dedicated image2video node; this one is aimed at the v1 generation and at convenience, not at maximum model choice.

Inputs that matter

  • api_token (required) - the JWT from the API Key node.
  • image / image_url / image_type - the dispatch switch. Attach an IMAGE tensor (Base64) or a URL, and you get image2video behavior. Leave them empty and it falls back to text2video. image_tail optionally sets the end frame for i2v runs.
  • positive_prompt / negative_prompt - the same as the dedicated nodes.
  • model_name - kling-v1, kling-v1-5, kling-v1-6.
  • mode - std or pro.
  • duration - 5 or 10 seconds.
  • use_camera_control - with camera_type presets (simple, down_back, forward_up, right_turn_forward, left_turn_forward) and six -10..10 camera sliders (horizontal, vertical, pan, tilt, roll, zoom), matching the image2video node.
  • cfg_scale - 0 to 1, default 0.5.
  • seed - local-only (drives re-run behavior, not Kling's RNG).
  • external_task_id / callback_url - plumbing for people who track jobs by their own ID or want a webhook when the render finishes.

The output

task_id, task_status, created_at, updated_at, seed - same shape as every other video node here. task_id → Query Status → Downloader, the standard pipeline.

When to reach for it vs. the split nodes

If your workflow always knows whether it's text-to-video or image-to-video, the dedicated nodes are slightly clearer to read. The hybrid shines when you're building a reusable template where the image input is sometimes connected and sometimes not - say, a scripted batch where a reference frame is optional. One node, and the wiring stays the same either way.

Where people get burned

  • "It didn't use my image!" Usually means the image input wasn't connected at the moment of execution - the node silently falls back to text2video. Check that the IMAGE wire is actually attached.
  • v2 model expectations. There are no kling-v2-* options here, so if you came from the image2video node looking for kling-v2-5-turbo, this isn't the node. Use the dedicated one.
  • Same async gotcha as everywhere. It returns a task ID, not a video. No Query Status node, no file on disk.
CategoryJM-KLingAI-API/hybrid-video

Inputs (22)

NameTypeDefaultDescription
api_tokenSTRING
positive_promptoptSTRING
negative_promptoptSTRING
model_nameoptCOMBOkling-v13 options: kling-v1, kling-v1-5, kling-v1-6
cfg_scaleoptFLOAT0.50–1
modeoptCOMBOstd2 options: std, pro
durationoptCOMBO52 options: 5, 10
imageoptIMAGE
image_urloptSTRING
image_typeoptCOMBOBase642 options: Base64, URL
image_tailoptIMAGE
use_camera_controloptBOOLEANfalse
camera_typeoptCOMBOsimple5 options: simple, down_back, forward_up, right_turn_forward, left_turn_forward
camera_horizontaloptFLOAT0.0-10–10
camera_verticaloptFLOAT0.0-10–10
camera_panoptFLOAT0.0-10–10
camera_tiltoptFLOAT0.0-10–10
camera_rolloptFLOAT0.0-10–10
camera_zoomoptFLOAT0.0-10–10
external_task_idoptSTRING
callback_urloptSTRING
seedoptINT-1-1–18446744073709550000

Outputs (5)

NameTypeDescription
task_idSTRING
task_statusSTRING
created_atSTRING
updated_atSTRING
seedINT