Nodes/ComfyUI-Kling-Direct/Kling Image Extend
ComfyUI Node

Kling Image Extend

Outpainting Your Image Into a Wider World

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 4
Kling Image Extend
  • auth
  • image
  • image
  • url
  • task_id
image_id
prompt
aspect_ratio1:1

Kling Image Extend expands an image beyond its borders - the outpainting move, done by Kling's hosted image model. You give it an image and a target aspect ratio, and it hallucinates the rest: a portrait becomes a wide shot with a plausible surrounding scene, a square becomes a 16:9 still, and the newly added area follows your prompt. It's the "widen the frame" node, and it's the fastest way in this pack to rescue a composition that's trapped in the wrong aspect ratio.

It's worth being clear about what it's not. This is hosted outpainting with Kling's own model - your image goes up to Kling's servers and comes back extended. If you'd rather outpaint locally with a tool like IC-Light, inpaint models, or the pack's own Image Omni, that's a different workflow with different costs. Image Extend is the direct route: one call, wider image.

How it works

Inputs:

  • auth - the KLING_AUTH object.
  • image_id - the asset ID of the image to extend (from the Asset Upload node). This is the field Kling's API actually wants.
  • prompt - optional description of the extended area: "a sunlit forest clearing," "a modern city street," whatever should fill the new space. If you leave it blank, Kling improvises.
  • aspect_ratio - the target ratio for the result: 16:9, 9:16, 1:1, 3:2, 2:3, 4:3, 3:4. This is the core control - it decides how much new canvas appears and in which direction.
  • image (optional) - an IMAGE tensor. If you supply it and leave image_id empty, the node uploads the tensor for you and uses that asset ID. Nice convenience: you can skip the manual Asset Upload step.

Outputs: image (IMAGE tensor of the extended result), url (the hosted URL), and task_id. Standard image-node trio.

How to get a good extend

  • Pick the ratio by intent, not impulse. The aspect_ratio is the whole game - going from 1:1 to 16:9 extends sideways, 1:1 to 9:16 extends vertically. Match it to where you want the scene to grow. The pack's Aspect Ratio Picker can tell you the nearest valid ratio for your current image, which is a good starting sanity check.
  • Describe what should be there. Kling fills unknown space better when you say what belongs in it. "A foggy coastline continuing left" beats a blank prompt for coherence.
  • Expect seams. Outpainting extrapolates; the boundary between original and new content is where artifacts live. A prompt that matches the original's lighting and palette reduces the tell. You can always run the result through the pack's upscale or a local detail pass.

Common issues

  • "Asset ID required" - you left image_id empty and passed no image tensor. Give it one or the other; the node only auto-uploads when you supply the tensor.
  • Extended area looks pasted-on - prompt mismatch. The new region follows your words more than your original's style, so describe the original's look and the content ("same overcast sky, a winding road continues to the right").
  • Wrong direction of extension - you picked a ratio that extends the wrong axis. Re-check aspect_ratio: the ratio describes the result, not the add-on.

Install

Ships in ComfyUI-Kling-Direct:

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-Kling-Direct

or ComfyUI Manager → search "Kling Direct" → install → restart. No model downloads, no GPU needed - Kling does the work, you spend the credits. It's the fastest composition-saver in the pack.

CategoryKling AI/Image

Inputs (5)

NameTypeDefaultDescription
authKLING_AUTH
image_idSTRINGAsset ID of the image to extend.
promptSTRINGPrompt for the extended area.
aspect_ratioCOMBO1:1Target aspect ratio for the extended image.
imageoptIMAGE

Outputs (3)

NameTypeDescription
imageIMAGE
urlSTRING
task_idSTRING