Qwen2 - Text To Image
A burner generator for prompt testing
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it is
The simplest node in this pack's Qwen folder: prompt in, image out, five aspect ratios, two formats, a seed. KIE hosts the Qwen2 text-to-image endpoint; the pack wraps it as a native ComfyUI node so it slots in next to your local graph like any other generator.
Nobody's first pick for a hero image - the newer Qwen 2.1 - Text to Image node in the same folder has 2K resolution, transparent backgrounds and a 5000-character prompt budget, and the pack's Nano Banana nodes are the quality bar. Where this one earns its place is as a burner: cheap, minimal parameters, quick enough to loop. If you're iterating on prompt phrasing, or building an LLM-writes-the-prompt pipeline and want to see fifty drafts, the fewer knobs the better.
How it works
The node is generated straight from KIE's request schema for the endpoint, so each widget is a documented API field with its documented default. Your prompt goes out as a generation task, the node polls the task until it completes or hits timeout_seconds (1200 seconds, 20 minutes, by default), then the resulting image is downloaded and returned as a ComfyUI IMAGE tensor. There's no local model involved at any point - it's an HTTP client wearing a ComfyUI node's clothes (docs/knowledge/external-api-nodes.md covers the category's upsides and its costs).
Because the model library is rebuilt from KIE's docs, this node's fields track whatever KIE currently documents for that endpoint. If KIE changes the API, the node changes with it.
Inputs and outputs
Required:
- prompt (STRING) - describes the image. Max 800 characters, which is short; this is a phrase-level generator, not a place to paste a style thesis.
Optional:
- image_size -
16:9by default, plus1:1,3:4,4:3,9:16. Notice how few options that is compared to the newer nodes' ratios; pick the closest and move on. - seed - same seed and prompt on the same model version gives the same image. That's your A/B control when you're changing wording.
- output_format -
pngorjpeg. - nsfw_checker -
falseby default. The tooltip spells out what that means: filtering is off, results come back from the model directly, and there's no guarantee anything gets caught. - timeout_seconds and callback_url - leave the callback empty for normal ComfyUI use.
Outputs: image, url, all_urls_json, task_id, raw_json, credits_consumed, credits_left. The url output is more useful than it looks in a prompt-testing setup - wire it into a text/note node and you've got a run log with actual links in it.
Install
Manager: search KIE-Nodes-Next and install, then restart ComfyUI. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
Then Settings → KIE.ai Nodes Next → Connection → Paste / replace KIE.ai API key. The pack checks the key against KIE before replacing anything you had saved, and shows a masked fingerprint plus your credit balance once it's in. On a headless server, set KIE_API_KEY instead - it takes priority over the saved key.
Requirements are just requests, Pillow, numpy, PyYAML. Nothing here compiles anything. Windows: the .vbs one-click installer in dist/ does the same job with folder detection.
Where people get burned
It is not the model you think. "Qwen2" here is KIE's endpoint naming, not a promise about which revision of the Qwen image stack is behind it. If you came in expecting Qwen-Image-Edit 2511-grade output, that's the edit node - and honestly the open weights are worth running locally if you have the card (docs/knowledge/ecosystems/qwen.md).
800 characters. Same trap as its edit sibling: paste a long structured prompt and you'll get a rejection, not a truncated prompt.
No negative prompt. This node has no negative field at all. Prompts that lean hard on "no X, not Y" style phrasing will not cooperate; that's the newer Qwen3 node's territory.
Every run costs money, and there's no guard rail. The node reports credits_consumed and credits_left after each generation. In a loop, watch them - hosted image calls are cheaper than video by a wide margin, but "cheap per call" plus "fifty drafts" is still a bill.
First launch after install. The pack syncs its model catalog from KIE's docs and may reload the ComfyUI frontend once. If a KIE node seems missing right after installing, that's usually the sync finishing; the KIE • Refresh Model Catalog node forces it.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The prompt to generate the image with (Max length: 800 characters) | |
| image_sizeopt | COMBO | 16:9 | The size of the generated image. Default value: 16:9 |
| seedopt | INT | 0-2147483648–2147483647 | The same seed and the same prompt given to the same version of the model will output the same image every time. |
| output_formatopt | COMBO | png | The format of the generated image. Default value: "png" |
| 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 | — |