Nodes/civitai-comfy-nodes/openai / gpt-image-1 / editImage
ComfyUI Node

openai / gpt-image-1 / editImage

The hidden mask input on OpenAI's first-gen image editor

By civitai·Created 2 months ago·Updated about a month ago· 42
openai / gpt-image-1 / editImage
  • images
  • mask
  • api_config
  • images
  • errors
  • workflow_id
  • raw_json
prompt
output_format
image_metadata
size1024x1024
quantity1
backgroundopaque
qualityauto

Scan the inputs on CivitaiImageGenOpenaiGptImage1EditImage and you'll spot something rare in this pack: a mask socket. The GPT Image 1 edit node does masked region editing, which puts it in a club with the old DALL-E 2 edit node - and the pair of them are the only masked-edit options across all ~160 Civitai nodes. The model underneath is the one that went viral in April 2025, and this node is how that same engine does image-to-image work inside ComfyUI.

What it is. Engine openai, model gpt-image-1, operation editImage, from the official civitai/civitai-comfy-nodes pack. Required inputs: prompt and images - wire a source image in from a Load Image node or any other generator. Optional: mask (an IMAGE input; in the graph you feed it a white-edit/black-keep mask, the same convention as local inpainting), size (1024x1024, 1536x1024, 1024x1536, default 1024x1024), quality (auto/high/medium/low, default auto), background (auto/transparent/opaque, default opaque), quantity, output_format, and image_metadata.

How it works. Standard pack mechanics: your image (and mask, if provided) gets serialized into the workflow payload, POSTed to orchestration.civitai.com, long-polled, and returned as images plus errors, workflow_id, and raw_json. The mask is the interesting part: leave it unconnected and you get whole-image editing; wire one in and GPT Image 1 regenerates only the masked region while preserving the rest - proper inpainting on a hosted model.

Inputs that matter. prompt does the work, in natural language ("replace the background with a mountain range at sunset"). If you're using the mask, describe what belongs in the masked area. quality (default auto - bump to high when the result matters, drop to low for drafts to save Buzz). And size should roughly match your source, or the edit will crop.

Install. With the pack, once:

cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt

Or ComfyUI Manager → Custom Nodes Manager → search Civitai Comfy Nodes → Install, restart, find it under Civitai/Image/openai.

Auth and gotchas. Credentials from a wired Civitai Auth node, then CIVITAI_API_TOKEN, then stored OAuth. The usual hints: 402 = insufficient Buzz, 401 = token expired, 429 = rate limit; 30-minute cap, early-preview pack. Your source image, mask, and prompt all leave the machine, and OpenAI's filter - the one the community spent 2025 complaining about for tripping on innocuous content - applies, with Civitai's moderation layered on top.

The take. The mask input is the reason to know this node. For targeted edits - "change the sign, keep everything else" - a masked GPT Image 1 edit is a real, working cloud inpainting path, and there aren't many of those. If you don't need the mask, the GPT Image 1.5 edit node is the stronger choice with its input_fidelity control. But if you want region-locked editing on an OpenAI model without standing up your own OpenAI API, this is one of exactly two doors in the pack, and the newer one (DALL-E 2) is a museum piece by comparison.

CategoryCivitai/Image/openai

Inputs (10)

NameTypeDefaultDescription
promptSTRING
imagesIMAGE
output_formatoptCOMBO4 options: , jpeg, png, webP
image_metadataoptSTRINGExternal metadata that will be stored with the image
sizeoptCOMBO1024x10243 options: 1024x1024, 1536x1024, 1024x1536
quantityoptINT11–10
backgroundoptCOMBOopaque3 options: auto, transparent, opaque
qualityoptCOMBOauto4 options: auto, high, medium, low
maskoptIMAGEEither A URL, A DataURL or a Base64 string
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (4)

NameTypeDescription
imagesIMAGE
errorsSTRING
workflow_idSTRING
raw_jsonSTRING