ADIC OpenAIGPTImage1
GPT Image 1 in ComfyUI — once you point it at the right API base
- image
- mask
- IMAGE
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 ishttps://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 tohttps://api.openai.com/v1or 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." Defaultlowis a sensible place to start.background-opaqueortransparent.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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| api_baseopt | STRING | — | |
| auth_tokenopt | STRING | — | |
| seedopt | INT | 00–2147483647 | not implemented yet in backend |
| qualityopt | COMBO | low | Image quality, affects cost and generation time. |
| backgroundopt | COMBO | opaque | Return image with or without background |
| sizeopt | COMBO | auto | Image size |
| nopt | INT | 11–8 | How many images to generate |
| imageopt | IMAGE | Optional reference image for image editing. | |
| maskopt | MASK | Optional mask for inpainting (white areas will be replaced) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |