Kling Image Generation
Text-to-Image With Kling's Hosted v3, Right in the Graph
- auth
- image
- url
- task_id
Kling Image Generation is the pack's text-to-image workhorse: type a prompt, get a Kling v3 image back as a normal IMAGE tensor, exactly where a local sampler would sit in your graph. It's the image-side complement to the video nodes, and it's the node you reach for when you want Kling's specific look - the same model family that powers its video - without leaving ComfyUI.
The honest framing first, because it shapes everything: Kling's image model is closed, hosted, and metered. There's no weights file to download and no VRAM involved - your prompt goes to Kling's servers and comes back as a result, billed in credits. The community's standard objection to API generation ("it's not local, data leaves the machine, it costs per call") applies fully here. What you get in exchange is a capable hosted model with no local install, which is exactly the use case the KB's API-wrapper pattern describes: a model you were never allowed to download, reached through a node that looks like any other generator.
How it works
The inputs that matter:
auth- the KLING_AUTH object.prompt- multiline; your main instruction. This is the one you'll spend most of your time on.negative_prompt- things to avoid, plain and simple.model_name- currently justkling-v3(the dropdown has one entry as of this version).aspect_ratio- one of the seven Kling ratios, default1:1.resolution-1k(~1024px) or2k(~2048px). 2k costs more credits; pick by destination.fidelity- a 0..1 slider, default 0.5. The tooltip says it plainly: 0.0 = creative, 1.0 = faithful. Lower values let the model be looser and more interpretive; higher values push prompt adherence. It's the Kling equivalent of a CFG knob, and 0.5 is a sane middle.n- how many images in one call, 1 to 9. Batch up when you're iterating; Kling returns them as a stacked IMAGE batch.
Outputs: image (IMAGE - a batch if n > 1), url (the hosted image URL), and task_id. The image output wires straight into anything that consumes images: save nodes, VAE-ish pipelines, or as the start of an Image-to-Video flow.
How to get a good one
- Write for a hosted filter. Kling enforces its own content policy server-side - there's nothing to abliterate, no weights to patch. If a prompt gets refused, it's refused; rephrase or route around it.
- Use
fidelityas your creative dial. Stuck in bland output? Drop fidelity toward 0.3 and give the prompt room. Need exact adherence (product shots, text)? Push toward 0.7+. - 2k is a real cost jump. Use 1k for drafts, 2k only for the final that ships. The Cost Estimator node can show you the spread before you commit.
- Chain it into video. The natural pipeline is Image Gen → Image-to-Video, giving you a consistent Kling look through the whole generation.
Common issues
- Rejected prompt - content policy or a malformed parameter. Check the error string; if it's moderation, rephrase.
n > 1returned fewer than requested - Kling sometimes returns fewer images than asked for; the node raises if none come back, but a partial batch is possible. Treatnas "up to n."- Aspect ratio surprises - pick the ratio deliberately. Kling won't letterbox; a mismatch with your downstream video ratio means cropping later.
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 models, no GPU, no extra deps - just the libraries ComfyUI already bundles. If you're already paying for Kling video, this node makes the images in your pipeline match it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| auth | KLING_AUTH | — | |
| prompt | STRING | Text description of the image to generate. | |
| negative_prompt | STRING | Things to avoid in the generated image. | |
| model_name | COMBO | kling-v3 | Kling image model version. |
| aspect_ratio | COMBO | 1:1 | Output image aspect ratio. |
| resolution | COMBO | 1k | Output resolution: 1k (~1024px) or 2k (~2048px). |
| fidelity | FLOAT | 0.500–1 | Image fidelity/detail level (0.0 = creative, 1.0 = faithful). |
| n | INT | 11–9 | Number of images to generate (1-9). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| task_id | STRING | — |