Comfly_gpt_image
Transparent PNGs and Loose Moderation, via API
- generated_image
- response
OpenAI's GPT Image models are the closed generators that do two things local models still struggle with: text rendering that doesn't look like a ransom note, and actual transparent-background output. This node puts GPT Image 1 (and its 1.5 refresh) inside ComfyUI through the Comfly proxy, so you get those capabilities without leaving your graph or opening your own OpenAI account.
It's a text-to-image node, plain and simple - prompt in, image out - aimed at the "I need a clean render with readable text" use case. The kind of thing you'd otherwise screenshot from ChatGPT and drag in. Here it's just another node in the pipeline.
How it works
Your prompt is sent to the proxy's OpenAI-compatible endpoint, which calls GPT Image, and the result comes back as an IMAGE tensor plus a raw response string. All inference happens on OpenAI's side; your GPU never wakes up. Per-call pricing, so the bill scales with how much you generate.
The inputs that matter
- prompt - the whole game. GPT Image is a strong prompt-follower; be concrete about text you want in the image (quote it), since accurate text rendering is its party trick.
- model -
gpt-image-1(default) orgpt-image-1.5. The 1.5 is the newer refresh; 1 is the battle-tested default. - quality -
auto/high/medium/low, defaultauto.highcosts more and takes longer; tryautofirst. - size -
auto,1024x1024,1536x1024,1024x1536. Defaultautolets the model pick. - background - here's the differentiator:
auto,transparent, oropaque. Settransparentand you get a real alpha PNG - gold for logos, icons, and assets you'll composite later. This is the input that makes the node worth installing on its own. - output_format -
png/jpeg/webp. PNG if you usedtransparent. - moderation -
autoorlow.lowrelaxes OpenAI's safety filtering. Use it knowing what you're asking for; the API's terms still apply. - n - 1–10 images per call. Each is billed, so "just to be safe" gets expensive fast.
- seed - set it if you want to lock a take.
Outputs are generated_image (IMAGE) and response (STRING, the raw API reply).
Install
Manager → search Comfyui_Comfly, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/Comfyui_Comfly
Restart. The requirements.txt is the usual aiohttp/requests/Pillow/numpy plus the torch/transformers already in your environment - no model files to download. Key from ai.comfly.chat goes in Comflyapi.json or the node's api_key field.
Where people get burned
Two classic traps. First: this is a resold OpenAI call, and background: transparent + output_format: png must both be set or you'll chase a phantom alpha that isn't there - the model can't give you transparency if you've asked for JPEG. Second: the per-call cost stacks with n and quality: high; a "quick test" of 4 high-quality images is four billed calls before you've learned anything. And moderation: low is a real loosening, not a free pass - keep the usual cloud-safety judgment about what you send through a third-party proxy.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| api_keyopt | STRING | — | |
| modelopt | COMBO | gpt-image-1 | 2 options: gpt-image-1, gpt-image-1.5 |
| nopt | INT | 11–10 | — |
| qualityopt | COMBO | auto | 4 options: auto, high, medium, low |
| sizeopt | COMBO | auto | 4 options: auto, 1024x1024, 1536x1024, 1024x1536 |
| backgroundopt | COMBO | auto | 3 options: auto, transparent, opaque |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
| moderationopt | COMBO | auto | 2 options: auto, low |
| seedopt | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| generated_image | IMAGE | — |
| response | STRING | — |