GPT Image
Sizes, Transparency, and Where the Moderation Dial Sits
- images
- provider
- image
- images
- text
- thought
GPT Image is the one closed image model that gets installed for a specific, unromantic reason: text rendering and instruction-following. If you need a product mockup with legible lettering on it, or a diagram that follows a written layout, this is the node people reach for - and they reach for it while grumbling about the price.
There is no local version and there never will be, which is the entire justification for an API node like this one (the KB's external-api-nodes.md lays out the category's trade-offs). If you can generate it locally, generate it locally. This is for the jobs local can't do.
The model dropdown changes the node
The model input is a dynamic combo over the GPT Image line (2.5 variants, 2, 1.5, 1, 1 Mini), and picking a version rebuilds the inputs below it. Smaller/older versions get fewer size options and a narrower quality range. A few specifics worth knowing because they're visible in the source:
- The newer versions offer
2048x2048,3840x2160-class sizes andqualityup toxhigh/max; the 1-series tops out at1024x1536. Customsize revealscustom_width/custom_heightin pixels, bounded 480–3840 in 16-pixel steps.backgroundincludestransparent, and the pack's own tooltip tells you the catch: transparent output requires png or webp, which brings us to the fields below.
The fixed inputs
- prompt - generation prompt, or the edit instruction when reference images are connected.
- n - 1 to 10 images per call. Nothing here is free; this is the money dial.
- seed -
0lets the API pick; changing a non-zero value forces a re-run. - output_format -
png(default),jpegorwebp. Setwebporjpegand you can use the compression control below; usepngfor transparency. - output_compression - 0–100, only meaningful for jpeg/webp.
- moderation -
autoorlow. Read that as a strictness dial, not an off switch:lowis looser, not unmoderated. The provider's own policy still applies, which is the recurring truth about every closed model - the filter follows the model. - images - autogrow reference input, up to 16 slots, batches expanded. Connecting one turns this into an editing node: "keep the layout, change the headline to…".
- system_prompt, extra, retry_count - the usual trio: instructions, raw JSON passthrough, and total attempts with a ~3s pause between.
Outputs: image (everything as one batch - but only if the sizes match, otherwise you get the first one), images (a proper list), text, thought.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes
cd ComfyUI-YogurtNodes
pip install -r requirements.txt
ComfyUI Manager works - search "YogurtNodes"; on the canvas the name gets a " (Yogurt Nodes)" suffix. Without a provider node connected, this falls back to official OpenAI with openai from custom_nodes/ComfyUI-YogurtNodes/yogurt_nodes/llm/api_key.json or OPENAI_API_KEY.
{ "openai": "sk-..." }
The pack also routes some GPT Image versions through OpenRouter and through relay providers, which is what the provider socket is for - same node, different pipe.
Gotchas that cost real money
Batch output collapse. n=4 with sizes that don't match returns one image on the image output. Take images and iterate if you're varying anything. The tooltip warns you; people still hit it.
Retries on a slow job. retry_count=3 on a call that times out means paying three times for three failures. Test at 1.
Compression on png. Set output_format to png and output_compression does nothing, which looks like the dial is broken. It isn't; it's format-scoped.
Transparent backgrounds in the wrong format. background: transparent plus jpeg is a contradiction the API resolves by ignoring you.
Assuming an edit is an edit. Reference-image editing quality varies a lot by version - the newest models hold the input better. If your edits drift, try a newer model entry before you rewrite the prompt.
And the expectation-setting one: GPT Image's safety behaviour has swung back and forth across releases (the KB's closed-source-models.md documents the whiplash), so a workflow that worked last month can refuse this month without you changing anything. Budget for that, and keep a local image model in the graph for the work this one won't do.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Prompt sent to the model. | |
| model | COMBO | Model version; the inputs below change with the selected model. | |
| n | INT | 11–10 | Number of images to generate. |
| seed | INT | 00–2147483647 | Sent to the API when the model supports it; changing it also forces a re-run. 0 lets the API pick a random seed. |
| output_format | COMBO | png | Encoded format returned by the API. |
| output_compression | INT | 1000–100 | jpeg / webp compression level. |
| moderation | COMBO | auto | Content moderation strictness. |
| extra | STRING | Optional JSON object merged into the request (for parameters not exposed as inputs). | |
| images | COMFY_AUTOGROW_V3 | Optional reference image(s); batches are expanded. Up to 16. | |
| retry_count | INT | 11–10 | Total attempts on failure. |
| system_promptopt | STRING | System instruction sent with the request. | |
| provideropt | YOGURT_LLM_PROVIDER | Provider node. When unconnected, the official API is used with keys from api_key.json or environment variables. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | All images as one batch (first image only if sizes differ). |
| images | IMAGE | — |
| text | STRING | — |
| thought | STRING | — |