Flux-2 - Pro Text to Image
When the cheap tier isn't good enough
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
The Flex node in this pack is where you explore. This one - Flux-2 Pro - is where you land when the composition has to be right and you're not the one paying per attempt on a deadline. Same inputs, same widget layout, different model ID and a different per-call price.
Worth saying plainly, because FLUX.2's reputation runs ahead of its adoption: this is a genuinely excellent image model whose open weights most people can't comfortably run. A 56B stack with a 24B text encoder is a download and a VRAM problem before it's a prompt problem. Calling it is a legitimate answer to that, and the Pro tier is the version with the least compromise.
How it works
Your prompt goes out as a hosted KIE job. The node submits it, polls until the image is done, downloads it, and returns a native ComfyUI IMAGE tensor. Everything downstream - detailers, upscalers, ControlNet on the result, a save node - treats it as though your own sampler generated it.
Because FLUX.2 is LLM-encoded, write prompts as prose. Not 1girl, masterpiece, best quality - actual sentences with the subject, the light, and the lens. The model reads instructions; give it some.
Inputs
prompt - required, 3 to 5000 characters. The widget's default is BFL's own demo prompt about a blister pack spelling "FLUX.2", which is a nice illustration of how specific this model expects you to be, and also not your image.
aspect_ratio - dropdown, default 1:1, and it lists auto too. On text-to-image there's nothing for auto to match, so choose a ratio.
resolution - dropdown, default 1K. This is the setting that moves the price most. Test at the default, then commit at the resolution you need.
nsfw_checker - a boolean defaulting to false, and per the tooltip false means KIE's filtering is disabled and results come back exactly as the model produced them. FLUX.2 is a heavily filtered model by training, so this switch is about the extra safety pass on top, not about unlocking anything. The tooltip also declines to promise the filter catches everything.
Rounding out the node: timeout_seconds (30–7200, 1200 default - generous, because 1K and up jobs are not instant) and callback_url, which you leave empty unless you're running a webhook receiver.
Outputs
image is the tensor to wire into whatever comes next. url is the hosted original if you want it outside Comfy, all_urls_json carries every URL in the response, task_id is the job identifier, and raw_json is the full provider payload - the first place to look when a result looks unlike what you asked for. credits_consumed and credits_left are floats, and the node writes both onto itself after each run, so a Pro batch tells you what it cost without you opening a billing page.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
Or install through ComfyUI Manager ("KIE.ai Nodes Next") and restart. Dependencies are requests, Pillow, numpy, PyYAML - a pack that hands you a 56B model with a four-package install and no downloads. Then set your API key once in Settings → KIE.ai Nodes Next → Connection. It's validated against KIE before the pack will overwrite a working key, is stored in ComfyUI's user config rather than the workflow, and only a masked fingerprint ever reaches the browser. KIE_API_KEY in the environment takes priority for server installs.
Before you batch
- Do the cheap pass on Flex. Pro is the tier you graduate to, not the one you experiment on with a 20-prompt grid.
- Bullet-proof your prompt first. Three or four Pro runs with one word changed each beats forty attempts at the same sentence.
- Remember where this data goes. Prompts and any reference images leave your machine and hit KIE's servers, forwarded to the model provider, subject to their moderation. Fine for most work, worth a thought for anything under NDA.
- "Endpoint has not been resolved yet" on first run means the catalog sync hasn't enriched this operation. Restart ComfyUI, or run the pack's catalog refresh node, and it fills in.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Hyperrealistic supermarket blister pack on clean olive green surface. No shadows. Inside: bright pink 3D letters spelling "FLUX.2" pressing against stretched plastic film, creating realistic deformation and reflective highlights. Bottom left corner: barcode sticker with text "GENERATE NOW" and "PLAYGROUND". Plastic shows tension wrinkles and realistic shine where stretched by the volumetric letters. | Must be between 3 and 5000 characters. (Max length: 5000 characters) |
| aspect_ratio | COMBO | 1:1 | Aspect ratio for the generated image. Select 'auto' to match the first input image ratio (requires input image). |
| resolution | COMBO | 1K | Output image resolution. |
| nsfw_checkeropt | BOOLEAN | false | Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements. |
| 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 | — |