KIE Kling Elements Batch
Batch named Kling elements so @character actually works
- element_1
- element_2
- element_3
- element_4
- element_5
- element_6
- element_7
- element_8
- element_9
- elements
- data
Kling 3.0 lets you define named elements - a character, an object, a face - and then reference them inside your prompt as @name. The single-element builder (KIE KlingElements) makes one of those references; this node collects up to nine of them into a single batch so the KIE Kling3_Video node can see them all at once.
Without this step, a multi-element prompt like "a woman with @dog and @old_woman" has nowhere to receive all three references - the video node's element input takes only one. Batch is the bridge.
How it works
It's a trivial but important plumbing node. Each element_1 through element_9 input is optional and accepts a KIE_ELEMENT payload from an upstream KIE KlingElements node. It merges whatever is connected into one KIE_ELEMENTS list, deduplicates any overlapping names, and passes it along. No media is uploaded here and nothing is generated - it's pure aggregation.
To build the elements themselves, remember the rule from the element node: each one takes either 2–4 images or a single video, never both, and it needs a name. Names are restricted to letters, numbers, _, and - - no spaces, so @old_woman is fine but @old woman will silently fail to match.
Inputs and outputs
- element_1 … element_9 - all optional; connect as many as your prompt references.
- elements (
KIE_ELEMENTS) - the batched payload. Wire this into theelementsinput onKIE Kling3_Video(orKIE Kling3_Preflight). - data (STRING) - a JSON preview of the batch, handy for a quick sanity check or for logging.
Install
Standard pack install - ComfyUI Manager (search "ComfyUI-Kie-API") or:
cd ComfyUI/custom_nodes
git clone https://github.com/gateway/ComfyUI-Kie-API
Restart and drop your Kie.ai API key into config/kie_key.txt. No model files, no GPU.
Where it trips people up
- Names must match your prompt exactly. The
@reference inshots_textorprompthas to equal the element'snamestring, character for character. A mismatch doesn't error loudly - you just get a video where the element is ignored. - Batch before the video node, not after. The order is Element → Batch → Video. The video node reads the whole batch at once.
datais a preview, not an input. It's informational; the actual payload that matters is theelementsoutput.
If you're doing anything beyond a single named reference in Kling 3.0, this little node is the difference between a prompt that works and a prompt that quietly drops half your cast.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| element_1opt | KIE_ELEMENT | — | |
| element_2opt | KIE_ELEMENT | — | |
| element_3opt | KIE_ELEMENT | — | |
| element_4opt | KIE_ELEMENT | — | |
| element_5opt | KIE_ELEMENT | — | |
| element_6opt | KIE_ELEMENT | — | |
| element_7opt | KIE_ELEMENT | — | |
| element_8opt | KIE_ELEMENT | — | |
| element_9opt | KIE_ELEMENT | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| elements | KIE_ELEMENTS | — |
| data | STRING | — |