Qwen Image 2.1 · Text to Image
The open-weight Qwen you can't be bothered to load locally
- images
- alpha
- task id
Here's the odd thing about this node: Qwen Image is open weight. You could download it. The Qwen-Image family is Apache 2.0, it's the model that took best-in-class text rendering away from the closed labs, and the Edit line built on it became the default open instruction editor largely because its licence let people build things on top of it rather than sending takedowns. So why call an API node for a model you can run at home?
Three honest reasons. It's a 20B model and it wants a lot of VRAM. The hosted version takes 5,000-character prompts, expands them for you, and handles the fifteen aspect ratios and three resolution tiers without you touching a node graph. And it costs roughly $0.024 an image, which is a lot cheaper than upgrading a graphics card. If you already run Qwen locally and you're happy, use yours. If you want Qwen-quality images on a laptop, this is the door.
The inputs
prompt- multiline, up to 5,000 characters, and natural language rather than tag soup. That's the family's whole character: the text encoder is an LLM, so it reads a paragraph about composition and lighting the way a person would.aspect_ratio- default 1:1, fifteen shapes available.resolution-1k,1.5kor2k, defaulting to1k.output_format-jpegby default; png and webp are also on offer.background-opaque(normal) ortransparent, which returns the subject on a real alpha channel. Transparent only works ifoutput_formatis png or webp - the author's own tooltip says so, and pickingtransparentwithjpegis the number one way to get a confusing result out of this node.enable_prompt_expansion- on by default, and it rewrites your prompt into a fuller scene description before generating. Useful when you write three words. If you wrote a careful 400-word prompt and got something you don't recognise, turn this off first.seed- same seed, same result. It's fixed by default so re-queueing doesn't silently buy a second image.
Outputs
images (an ordinary ComfyUI IMAGE - wire it to Save Image, a detailer, an upscaler, whatever), alpha, and task id.
alpha is the one people get wrong. It's a MASK describing transparency per image, and per the node's tooltip 1 is opaque. So it's an alpha channel, not a "here's the subject" selection: if you want to keep only the subject, you want the region where alpha is 1, and if you're compositing, remember that 0 means see-through. It's also only meaningful when you asked for a transparent background - with opaque there's nothing in it worth wiring.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi
Restart ComfyUI. No dependencies, no weights, no GPU. Paste a key from spicyapi.ai/console/keys into Settings > SpicyAPI and restart once so the node list refreshes from your account - or set SPICY_API_KEY on a server. The key is deliberately not a node widget, so it can't leak into a workflow or an image's metadata.
Things that bite
Cost adds up per image, quietly. Image models are cheap enough that people stop counting, then run a 60-image batch. Set Max cost per run in the SpicyAPI settings; the node quotes each run first and refuses anything over your ceiling, with nothing charged.
Prompt expansion is a hidden rewrite. It's on by default across this family. When your text-rendering prompt comes back with the wrong wording, that's why - the model may have "improved" your quoted signage.
Filtering. This is an open-weight line with a permissive licence, and the pack describes it as having no content filter. That's a statement about the model, not a promise about every downstream deployment; moderation still lives wherever the inference runs.
Cancelling stops the wait, not the job. Interrupt a run and it finishes on SpicyAPI anyway and is charged if it succeeds - the result sits in your console for 14 days. Failures come back with a task id, and 40004 specifically means no deployment serves the combination you selected.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Describe the subject, composition, lighting, and any wording to render. | |
| aspect_ratio | COMBO | 1:1 | Output aspect ratio. |
| resolution | COMBO | 1k | Output resolution tier. |
| enable_prompt_expansion | BOOLEAN | true | Rewrite the prompt into a fuller scene description before generating. On by default; turn it off to have the prompt followed word for word. |
| background | COMBO | opaque | opaque keeps a normal background; transparent returns the subject alone on a real alpha channel (needs output_format png or webp). |
| output_format | COMBO | jpeg | Container of the returned image. |
| seed | INT | 00–2147483647 | Same seed and settings, same result. Set 'control after generate' to randomize to get a new result on every run; every run is billed. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| alpha | MASK | Transparency of each image: 1 is opaque. |
| task id | STRING | The SpicyAPI task id, for the console logs or support. |