Nodes/ComfyUI-Kling-Direct/Kling Create Element
ComfyUI Node

Kling Create Element

Teach Kling Your Character Once, Then Just Point At It

By IxMxAMAR·Created 6 months ago·Updated 3 days ago· 5
Kling Create Element
  • auth
  • frontal_image
  • refer_image_1
  • refer_image_2
  • refer_image_3
  • element_id
  • task_id
◄element_name►
◄element_description►

Reusing the same character across a run of prompts is the oldest problem in this hobby, and Kling's answer is the "element": you upload a few pictures of a thing, Kling gives it an ID, and from then on you refer to that ID instead of re-describing the face. Kling Create Element is the node that mints that ID inside ComfyUI.

If you've been doing this locally, you already know the shape of the problem. Qwen-Image-Edit gets character consistency by stuffing reference images into the model's context, and people burn a lot of time on crop-and-stitch to stop identity drifting across a chain of edits. The element is the hosted version of that idea - but with a hard side effect: the reference lives on Kling's servers under a permanent ID rather than in your graph.

What it does, mechanically

You give it a frontal image plus up to three extra angles or close-ups, a name, and a short description. The node base64-encodes those images, posts them to Kling's advanced-custom-elements endpoint, then polls until the task completes and reads the assigned element_id out of the response. That's the whole trick. There's no local model, no downloads, no weights - this is an API wrapper node that happens to sit in the Config category because what it produces is a reference, not a picture.

One nice detail: this node does not need a Kling API key. It works with the classic access key / secret key pair, so you can build an element library before you go anywhere near the Kling 3.0 Turbo path, which is the only part of this pack that insists on an API key.

The inputs that actually matter

Four are required, three are optional, and the optional ones are quietly the point.

  • element_name - max 20 characters. The tooltip says it, and Kling enforces it, so "my_oc_v3_final" is going to be a sad experience.
  • element_description - multiline, max 100 characters. Keep it factual. It's a label, not a prompt.
  • frontal_image - the anchor. A clean, well-lit, forward-facing shot. If there's a second person in frame, crop them out first - the tooltips on this pack's other reference nodes say it plainly ("Kling does not crop"), and it's just as true here.
  • refer_image_1 - another angle or a close-up. Required by the node, so you need at least two pictures total.
  • refer_image_2 and refer_image_3 - optional, same idea. More angles means the element holds up better when you spin the camera.

Outputs are just element_id (a STRING) and task_id. Wire element_id into the element_ids field on Kling Video Omni or Kling Image Omni - it's comma-separated, so you can feed two elements in and let them interact in one shot.

Install

Same as the rest of the pack. ComfyUI Manager → Install Custom Nodes → search "Kling Direct" → Install → restart. Or from a shell:

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

There is nothing else to install. The pack runs on stdlib plus requests, Pillow, numpy, torch and opencv-python, all of which ComfyUI already has. No model files, no multi-gigabyte download.

You do need credentials: get an access key and secret key from https://kling.ai/dev (a new account has to clear KYC first - that's the annoying part, not the install), drop a Kling AI Authentication node in, paste them, and wire its auth output into this node. Setting KLING_ACCESS_KEY and KLING_SECRET_KEY in the environment also works and keeps the keys out of your workflow JSON.

Where people get burned

The failure with the clearest cause: the task completes but comes back with no elements, and you get an exception naming the response keys. Practically always a bad frontal_image - too small, two subjects, or a face at an angle so extreme the service can't anchor on it.

The second one isn't a bug, it's an expectation to set. The element lives on Kling's side. Delete it upstream and your workflow breaks. Your graph is no longer self-contained, and the images you uploaded are on someone else's disk - which is the standard trade on every node in this corner of the ecosystem.

Finally, remember what this actually is: a metered API call on your Kling account, and so is every generation that references the resulting element. Check the pack's Cost Estimator before you batch-test twenty variations of the same character.

CategoryKling AI/Config

Inputs (7)

NameTypeDefaultDescription
authKLING_AUTH—
element_nameSTRINGElement name (max 20 characters).
element_descriptionSTRINGElement description (max 100 characters).
frontal_imageIMAGEFrontal reference image of the element.
refer_image_1IMAGEReference image from another angle or a close-up.
refer_image_2optIMAGE—
refer_image_3optIMAGE—

Outputs (2)

NameTypeDescription
element_idSTRING—
task_idSTRING—