imagen4-fast
Draft With This, Finish With the Real One
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it's for
This is Imagen 4's cheaper, quicker tier, wrapped as its own node. Same job - text in, image out - with the dials turned toward speed. In a metered API world that's not a niche: if you're exploring compositions, testing prompt phrasings, or filling a contact sheet, you do not want to pay headline-model rates for every throwaway.
The workflow it belongs to is boring and correct: draft on the fast tier, then take the two or three prompts that actually worked and run them through the full Imagen 4 node. You'll spend a fraction of what you'd spend iterating on the expensive model, and you'll make the good decisions with more shots on goal.
Same deal as the rest of this pack: it's an API call, not a local model. Google doesn't open-weight Imagen, so there's no download-and-run option - this node is the only way Imagen enters your graph, and your prompts and images leave the machine when you use it.
How it works
The node posts your prompt to the Imagen 4 fast endpoint through KIE, using the key stored in Connection Settings. It then waits for the task to land and converts the result into a real ComfyUI IMAGE tensor via the pack's image downloader, so the output wires straight into the rest of your graph - masks, upscalers, img2img chains - with no manual file handling. The URLs, task ID and full provider response come back too, so nothing is lost if you want to work with the raw response.
Credit accounting is part of the design: credits_consumed and credits_left are on the node as output sockets and rendered as a receipt underneath the node after each run. On a pay-per-call API that's the feature that keeps you honest.
Inputs and outputs
Required: prompt (multiline STRING). The tooltip caps it at 5000 characters, and the shipped default is a cinematic photorealistic portrait prompt - replace it, it's just documentation filler.
Optional:
negative_prompt- up to 5000 characters of "not this."aspect_ratio-1:1,16:9,9:16,3:4,4:3, orauto. Note the default here is16:9, where the full Imagen 4 node defaults to1:1- so a workflow copied between the two can silently change your framing.seed- INT, default 0. And this is the trap: on imagen4 the equivalent field is a STRING, on this node it's an int. Same family, different widget. A cross-wired seed will fail validation or quietly lose its connection.timeout_seconds- INT, default 1200, min 30, max 7200, step 30.callback_url- leave empty for in-graph use; it's for external callback setups.
Outputs: image (IMAGE), url, all_urls_json, task_id, raw_json (STRING), credits_consumed, credits_left (FLOAT). Feed image downstream; keep url if something outside ComfyUI needs the link.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
Restart ComfyUI, then set your key once at Settings → KIE.ai Nodes Next → Connection. The pack checks the key against KIE before saving it, shows only a masked fingerprint afterward, and keeps the stored key in ComfyUI's user config directory rather than your workflow file. On servers, KIE_API_KEY takes priority over the saved key.
Requirements are requests, Pillow, numpy, PyYAML - this pack ships no models and runs no inference locally, so there's no weight download and no VRAM cost. Windows users can take the one-click installer under dist/; it detects Desktop, Portable and manual installs and backs up any earlier copy of the pack.
Where people get burned
The seed type mismatch is the one that wastes the most time, precisely because the two nodes look identical on the canvas. If you swap fast for full (or the reverse) and your seed wire goes red, that's why.
Then quality expectations. "Fast" is a real trade, not a free lunch - the whole reason the full node still exists is that it renders prompts more faithfully. If your concept needs precise text, tricky spatial arrangements, or a specific rendering style, draft on fast and finish on full rather than pushing fast harder.
And the metering habit: because this tier is cheap, it's tempting to leave a batch loop running while you're elsewhere. Per-call charges don't care that each call was small. Check credits_consumed before you walk away.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Create a cinematic, photorealistic medium shot capturing the nostalgic warmth of a late 90s indie film. The focus is a young woman with brightly dyed pink hair (slightly faded) and freckled skin, looking directly and intently into the camera lens with a hopeful yet slightly uncertain smile. She wears an oversized, vintage band t-shirt (slightly worn, with the faintly cracked white text “KIE AI” across the chest) layered over a long-sleeved striped top, along with simple silver stud earrings. The lighting is soft, golden hour sunlight streaming through a slightly dusty window, creating lens flare and illuminating dust motes in the air. The background shows a blurred, cluttered bedroom with posters on the wall and fairy lights, rendered with a shallow depth of field. Natural film grain, a warm, slightly muted color palette, and sharp focus on her expressive eyes enhance the intimate, authentic feel. | The text prompt describing what you want to see (Max length: 5000 characters) |
| negative_promptopt | STRING | A description of what to discourage in the generated images (Max length: 5000 characters) | |
| aspect_ratioopt | COMBO | 16:9 | The aspect ratio of the generated image |
| seedopt | INT | 0-2147483648–2147483647 | Random seed for reproducible generation |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |