ComfyUI Node

GPT Image

Sizes, Transparency, and Where the Moderation Dial Sits

By yogurt7771·Created 2 years ago·Updated 6 days ago· 3
GPT Image
  • images
  • provider
  • image
  • images
  • text
  • thought
◄prompt►
◄model▾►
◄n1►
◄seed0►
◄output_formatpng►
◄output_compression100►
◄moderationauto►
◄extra►
◄retry_count1►
◄system_prompt►

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 and quality up to xhigh/max; the 1-series tops out at 1024x1536.
  • Custom size reveals custom_width / custom_height in pixels, bounded 480–3840 in 16-pixel steps.
  • background includes transparent, 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 - 0 lets the API pick; changing a non-zero value forces a re-run.
  • output_format - png (default), jpeg or webp. Set webp or jpeg and you can use the compression control below; use png for transparency.
  • output_compression - 0–100, only meaningful for jpeg/webp.
  • moderation - auto or low. Read that as a strictness dial, not an off switch: low is 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.

CategoryYogurtNodes/LLM/Image

Inputs (12)

NameTypeDefaultDescription
promptSTRINGPrompt sent to the model.
modelCOMBOModel version; the inputs below change with the selected model.
nINT11–10Number of images to generate.
seedINT00–2147483647Sent to the API when the model supports it; changing it also forces a re-run. 0 lets the API pick a random seed.
output_formatCOMBOpngEncoded format returned by the API.
output_compressionINT1000–100jpeg / webp compression level.
moderationCOMBOautoContent moderation strictness.
extraSTRINGOptional JSON object merged into the request (for parameters not exposed as inputs).
imagesCOMFY_AUTOGROW_V3Optional reference image(s); batches are expanded. Up to 16.
retry_countINT11–10Total attempts on failure.
system_promptoptSTRINGSystem instruction sent with the request.
provideroptYOGURT_LLM_PROVIDERProvider node. When unconnected, the official API is used with keys from api_key.json or environment variables.

Outputs (4)

NameTypeDescription
imageIMAGEAll images as one batch (first image only if sizes differ).
imagesIMAGE—
textSTRING—
thoughtSTRING—