Qwen 2.1 - Text to Image
Text rendering, transparency, and a seed that works
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
Two reasons people reach for a hosted Qwen image model rather than a local checkpoint: it renders text inside images better than most local bases, and it hands back a real alpha channel when you ask for a transparent background. Both are things open local workflows still fiddle with. This node is the text-to-image half of that - prompt in, IMAGE out, no reference required.
It's also the cheapest sensible way to prototype a composition before you commit to a local render pipeline. Generate the layout, check the framing, then rebuild it locally with the model you actually want to ship.
What it's doing
A KIE Market job, model qwen2-1/text-to-image. The node submits your prompt plus the optional fields, polls the task, downloads the result and decodes it into a ComfyUI IMAGE tensor. Nothing local runs. Every execution is a billed call, and the pixels go through KIE's infrastructure - that's the trade for not owning the GPU.
Worth knowing because it changes how you prompt: enhance_prompt is on by default, so the model rewrites your words into a fuller scene description before generating. Helpful for composition, unhelpful if you're testing a specific phrasing - turn it off when the wording itself is what you're evaluating.
Inputs
- prompt - required, up to 5000 characters, any language. Be specific about the text you want rendered (wrap it in quotes in the prompt) and about the composition.
- aspect_ratio -
16:9is the node's default even though the API's own default is1:1; the full list covers1:1,4:3,3:4,3:2,2:3,9:16,21:9,9:21. Set it deliberately, because the pixel size is the ratio times the resolution tier. - resolution -
1Kor2K. Only those two;4Kis rejected.2Kis four times the pixels and noticeably slower. - background -
opaque(default) ortransparent. Transparent produces a genuine alpha channel in PNG or WebP. The prompt rule that trips people up: when you ask for transparency, describe only the subject. Any mention of a background, a surface or a scene tends to produce an opaque image. - output_format -
png,webporjpeg. JPEG has no alpha, so it can't be combined with a transparent background. - enhance_prompt - on. The single most consequential boolean here.
- seed - the reason this node is nicer to iterate on than some hosted competitors: the same seed with the same prompt and parameters reproduces the image within a service version. Lock it once you've found your composition.
- nsfw_checker - ships
false, meaning no additional filtering pass beyond the provider's own. - timeout_seconds, callback_url - defaults; leave the callback empty.
Outputs: image, url, all_urls_json, task_id, raw_json, credits_consumed, credits_left. all_urls_json is worth keeping an eye on: if the provider returns more than one result, you get every URL, not just the one the node decoded.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
cd ComfyUI-KIE-Nodes-Next && pip install -r requirements.txt
# restart ComfyUI
Or Manager → search "KIE.ai Nodes Next". Dependencies: requests, Pillow, numpy, PyYAML. No model files, no VRAM, so the install is a few seconds. Then one key paste in Settings → KIE.ai Nodes Next → Connection - tested against KIE before it's saved, kept out of workflow JSON, shown only as a masked fingerprint.
Failure modes and honest advice
Transparency requests that come back opaque are almost always a prompt problem, not a node problem: you mentioned a background. Rewrite for the subject alone.
Also: an unwired image output means the node never executes. It's not an output node, so nothing runs and nothing is charged - a common "why is there no error and no image" moment. Connect it to a preview or save node first.
Use the right-click KIE Next · Check inputs & model controls menu when you want the documented limits without spending anything; it reads cached documentation fields locally and won't upload or submit.
And the standing objection to every node in this pack: you cannot run this model at home, so an API call is the honest price, but that price recurs on every iteration. If your actual goal is a hundred images of the same character, a local checkpoint plus a small LoRA is cheaper by the end of the week.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A corgi wearing a yellow rain hat sitting on stone steps after the rain, shallow depth of field | The prompt that describes the image content, style and composition you want to generate. Required. Any language is supported, up to 5000 characters; if it is longer, the request is rejected. |
| aspect_ratioopt | COMBO | 16:9 | The output aspect ratio. Default `1:1`. The actual pixel size also depends on `resolution`. |
| resolutionopt | COMBO | 1K | The output resolution tier. `1K` is the faster option; `2K` produces four times the pixels and takes longer. Only `1K` and `2K` are accepted — with any other value, including `4K`, the request is rejected. |
| backgroundopt | COMBO | opaque | Background type. transparent outputs a PNG or WebP with a real alpha channel and cannot be used with JPEG. When using transparent, describe only the subject — prompts that mention a background, scene, surface, etc. may produce a non-transparent result. |
| output_formatopt | COMBO | png | The output image format. `png` (default) and `webp` both carry an alpha channel and can be used with `background: transparent`. `jpeg` has no alpha channel and cannot be combined with a transparent background. |
| enhance_promptopt | BOOLEAN | true | Rewrites the prompt into a fuller scene description before generating, which noticeably improves quality. Enabled by default (also when the parameter is omitted); pass false to turn it off. |
| seedopt | INT | 20260921-2147483648–2147483647 | The random seed. Omit it to generate with a random seed. Passing the same seed together with the same prompt and parameters reproduces the same image within the same service version. |
| nsfw_checkeropt | BOOLEAN | false | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
| 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 | — |