KLingAI Image Generation
Kling text-to-image with reference-image modes
- image
- task_id
- task_status
- created_at
- updated_at
- seed
You probably didn't install a Kling pack for the image node - the video is the headline - but KLingAI Image Generation is a solid surprise. It's Kling's text-to-image API (/v1/images/generations) wrapped as an async task node, and it's the natural feeder for the image2video node in the same pack: generate a frame, then animate it. If you're building "image → video" pipelines entirely inside ComfyUI, this node closes the loop so you never leave the graph.
It's async like every generation node here - POST, get task_id, poll with Query Status, download. But it has one genuinely interesting wrinkle: reference-image modes. Kling's image API isn't just prompt → picture. You can pass a reference image and tell it whether to preserve the subject (clothing, pose, object identity) or the face (the person's appearance), with separate fidelity controls for each.
Inputs that matter
- api_token (required) - from the API Key node.
- prompt (required) - the generation prompt, freeform.
- image / image_url / image_type - optional reference image, fed as a tensor (Base64) or a URL.
- image_reference -
subjectorface. Subject locks onto the thing/outfit in the reference; face locks onto the person. Pick based on what you're preserving. - image_fidelity - 0 to 1, default 0.5. How hard to hold onto the reference image. Higher = more literal.
- human_fidelity - 0 to 1, default 0.45. Only relevant for face references; how closely the result matches the person.
- model_name -
kling-v1,kling-v1-5,kling-v2. - negative_prompt - the usual.
- n - 1 to 9. How many images per request. Kling will happily make you a contact sheet's worth in one task.
- aspect_ratio - eight options:
16:9,9:16,1:1,4:3,3:4,3:2,2:3,21:9. More ratios than the video nodes offer, so you can produce landscape frames to feed i2v. - seed - local-only, same caveat as everywhere.
The output
task_id, task_status, created_at, updated_at, seed - the pack's standard shape. Query Status handles the polling and returns the image URL; the Image Downloader saves it and converts it to an IMAGE tensor you can feed straight into image2video. When n is more than 1, note that Query Status returns the first image's URL - the rest are in the task result, which the downloader won't chase for you.
A neat closed loop
API Key → this node (prompt + reference) → Query Status → Image Downloader → Image2Video → Query Status → Video Downloader. Frame first, then animate it. That's a full "brand image to motion" pipeline with zero VRAM spent on a diffusion model.
Where people get burned
- Fidelity sliders doing nothing visible. If you don't pass a reference image,
image_reference,image_fidelity, andhuman_fidelityare inert. They only bite when an image is connected. - Face mode without a clear face.
facereference works best with a tight, well-lit shot of the person; wide group shots tend to come back weak or drift. - Multi-image tasks. Set
nto 4 and you'll get a task that succeeds with four URLs, but this node's Query Status pairing only surfaces the first. If you need all four, that's the one gap. - Standard async reminder. No Query Status, no image on disk. URL → Downloader, always.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| api_token | STRING | — | |
| prompt | STRING | — | |
| image_typeopt | COMBO | Base64 | 2 options: Base64, URL |
| imageopt | IMAGE | — | |
| image_urlopt | STRING | — | |
| image_referenceopt | COMBO | subject | 2 options: subject, face |
| model_nameopt | COMBO | kling-v1 | 3 options: kling-v1, kling-v1-5, kling-v2 |
| negative_promptopt | STRING | — | |
| image_fidelityopt | FLOAT | 0.500–1 | — |
| human_fidelityopt | FLOAT | 0.450–1 | — |
| nopt | INT | 11–9 | — |
| aspect_ratioopt | COMBO | 16:9 | 8 options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, +2 |
| callback_urlopt | STRING | — | |
| seedopt | INT | -1-1–18446744073709550000 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| task_id | STRING | — |
| task_status | STRING | — |
| created_at | STRING | — |
| updated_at | STRING | — |
| seed | INT | — |