Nodes/ComfyUI-ADIC/ADIC OpenAIGPTImage1
ComfyUI Node

ADIC OpenAIGPTImage1

GPT Image 1 in ComfyUI — once you point it at the right API base

By jinchanz·Created about a year ago·Updated a day ago· 5
ADIC OpenAIGPTImage1
  • image
  • mask
  • IMAGE
prompt
api_base
auth_token
seed0
qualitylow
backgroundopaque
sizeauto
n1

This is a synchronous GPT Image 1 node that drops OpenAI's gpt-image-1 model straight into a graph, ComfyUI's comfy_api_nodes style: API_NODE = True, async under the hood, IMAGE tensor out. Wire a prompt to it, run, and a real image comes back - no local checkpoint, no VRAM cost, just a per-image API bill.

How it works is clean enough to be worth understanding. With only a prompt, it POSTs to /v1/images/generations (OpenAI-compatible JSON). The moment you also feed an image, it switches to /v1/images/edits as multipart/form-data - that's the GPT Image edit endpoint, and a batch of input images goes out as image[] fields. Add a mask on top and it becomes inpainting: per the tooltip, white areas get replaced. Inputs are downscaled to roughly 1.5MP before they're sent, so it won't choke on a 4K source.

Inputs that actually matter

  • prompt - the only required input. Multiline.
  • api_base - this is the one to watch. The default is https://api.gpt.ge, a third-party OpenAI-compatible proxy, not OpenAI's official endpoint. If you have your own OpenAI key and gateway, set this to https://api.openai.com/v1 or your relay. Most 401/authentication confusion with this node is people forgetting the base URL is a proxy.
  • auth_token - Bearer token for the API. If your provider needs a Comfy Org API key instead, the node has a hidden key input for that path - either way, auth is "one bearer string, whichever the endpoint expects."
  • quality - low / medium / high; the author's tooltip: "affects cost and generation time." Default low is a sensible place to start.
  • background - opaque or transparent.
  • size - auto, 1024x1024, 1024x1536, 1536x1024.
  • n - how many images (1–8); more images, more money, and the output becomes a batch.
  • image / mask - optional, turn text-to-image into edit/inpaint.
  • seed - the author's own tooltip is blunt: "not implemented yet in backend." Leave it alone.

Output is a single IMAGE tensor (stacked, if n > 1), ready for a Preview or Save node.

Gotchas

The model name is hardcoded to gpt-image-1 - you can't swap it to a newer GPT Image generation without an update. And remember every generation costs real money on the API side; there's no "free tier" surprise here.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/jinchanz/ComfyUI-ADIC

Restart ComfyUI, or search "ComfyUI-ADIC" in ComfyUI Manager. No model files to download; the pack's README (Chinese, mostly about the image-translate nodes) only mentions requests, which ComfyUI already ships. If the node does nothing but error, check api_base and auth_token before anything else.

Categoryapi node/image/OpenAI

Inputs (10)

NameTypeDefaultDescription
promptSTRING
api_baseoptSTRING
auth_tokenoptSTRING
seedoptINT00–2147483647not implemented yet in backend
qualityoptCOMBOlowImage quality, affects cost and generation time.
backgroundoptCOMBOopaqueReturn image with or without background
sizeoptCOMBOautoImage size
noptINT11–8How many images to generate
imageoptIMAGEOptional reference image for image editing.
maskoptMASKOptional mask for inpainting (white areas will be replaced)

Outputs (1)

NameTypeDescription
IMAGEIMAGE