Nodes/Replicate Select/Kling v3 Video (Replicate)
ComfyUI Node

Kling v3 Video (Replicate)

Kling v3 video in your graph — including the multi-shot JSON mode

By Pharma-Lobby·Created 2 months ago·Updated 2 months ago· 0
Kling v3 Video (Replicate)
  • start_image
  • end_image
  • video_path
prompt
negative_prompt
modepro
aspect_ratio16:9
duration5
generate_audiofalse
multi_prompt

Kling is Kuaishou's closed video model, the one with the reputation for natural motion and, yes, the occasional physics daydream. This node wraps kwaivgi/kling-v3-video on Replicate so it runs inside ComfyUI without you ever touching a GPU or a model file. You type a prompt, optionally feed first/last frames, and a few minutes later an MP4 lands in your output folder with a path handed back to the graph.

Like every video node in this pack, it's a path returner, not a tensor returner - more on that below, because it's the thing that trips people up first.

How it works

Pack standard engine: replicate.run("kwaivgi/kling-v3-video", input=...), wait for the worker, download the MP4. The node writes the file to ComfyUI/output/video/ with a replicate_kwaivgi_kling-v3-video_<timestamp>.mp4 name and returns the video_path as a STRING. Because it's marked as an output node, the file also shows up in the UI's history panel - so for a simple "generate a clip" workflow you don't need anything downstream at all.

The inputs that matter

  • prompt (required) - up to 2500 characters describing the shot.
  • negative_prompt - things to keep out, up to 2500 chars.
  • start_image - first-frame image (jpg/png, max 10MB, min 300px, aspect 1:2.5 to 2.5:1). This is Kling's strong suit - image-to-video is where it shines.
  • end_image - last-frame image. Two honest gotchas in the tooltip: it requires start_image, and aspect_ratio is ignored whenever start_image is provided - the model follows the image instead.
  • mode - standard (720p), pro (1080p, default), or 4k. Price scales with this, hard.
  • duration - 3–15 seconds, default 5.
  • generate_audio - off by default. Kling can add native audio; flip it on when you want sound in the clip.
  • multi_prompt - the interesting one. A JSON array of shot definitions for multi-shot mode, e.g. [{"prompt": "..." , "duration": 3}, ...]. Max 6 shots, min 1s per shot, and the total must equal duration - mismatched totals error out rather than politely adjusting.

Output: video_path, a STRING.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Pharma-Lobby/ComfyUI-Replicate-Select

Or ComfyUI Manager → Install Custom Nodes → "Replicate Select", restart. Dependency: replicate>=1.0.7. Token via environment variable:

export REPLICATE_API_TOKEN=r8_...

Where people get burned

  • It returns a path, not a video tensor. You can't wire video_path into a VideoCombine or a frame-extractor expecting frames. The node's job is to produce the file; if you need the frames in-graph, load the returned path with a video-loader node yourself.
  • end_image without start_image is an error. The dependency is explicit and the failure isn't friendly.
  • Multi-shot math. multi_prompt totals must equal duration exactly, or the call fails. Keep your shots' durations summing to the number you set.
  • The 4k meter. 4k mode is the expensive seat. Use pro for tests and reserve 4k for the take you're actually keeping.
CategoryReplicate Select/video

Inputs (9)

NameTypeDefaultDescription
promptSTRINGText prompt for video generation. Max 2500 characters.
negative_promptoptSTRINGThings you do not want to see in the video. Max 2500 characters.
start_imageoptIMAGEFirst frame image. Supports .jpg/.jpeg/.png, max 10MB, min 300px, aspect ratio 1:2.5 to 2.5:1.
end_imageoptIMAGELast frame image. Requires start_image. Supports .jpg/.jpeg/.png, max 10MB, min 300px.
modeoptCOMBOpro'standard' generates 720p, 'pro' generates 1080p, '4k' generates 4K.
aspect_ratiooptCOMBO16:9Aspect ratio. Ignored when start_image is provided.
durationoptINT53–15Video duration in seconds.
generate_audiooptBOOLEANfalseGenerate native audio for the video.
multi_promptoptSTRINGJSON array of shot definitions for multi-shot mode. Each shot: {"prompt": "...", "duration": N}. Max 6 shots, min 1s per shot, total must equal duration.

Outputs (1)

NameTypeDescription
video_pathSTRING