Openai Gpt Image 2 Edit (Official Edition)
GPT Image 2 edit with real dimension control — the Official Edition
- images
- api_config
- image
- request_id
- urls
The image-to-image version of GPT Image 2's Official Edition: same natural-language editing as the Channel Edition - image in, instruction in, edited image out - but with width, height, and quality exposed as real inputs instead of hidden defaults. If you're editing images that have to come out at a specific size, this is the node you want.
GPT Image's edit behavior is the reason its predecessor line went viral: describe a change in plain words and the model just does it, no masks, no inpainting passes, no denoise knob. The Official Edition layers OpenAI's exact output contract on top, and the dimensions follow the same rules as the text-to-image sibling: multiples of 16 in both directions, maximum side 3840px, aspect ratio 3:1 or less, and total pixels between 655,360 and 8,294,400. The defaults here are 1280×720, and quality defaults to medium.
Why you'd reach for it
Two reasons, really. First, editing by description genuinely saves graph-building time when the alternative is a hand-drawn mask plus a local inpaint pass - and the community's own troubleshooting lore on inpainting is mostly about masks that don't cover the right thing and denoise values that go too far. This node sidesteps the entire class of problem. Second, the explicit dimensions mean your edit output can feed directly into a video pipeline or a fixed-size composite without a resize step that costs quality.
The trade-offs are unchanged from the rest of the GPT Image family: closed model, billed per call, and OpenAI's guardrails sitting on top of everything you try. Convenient, not unrestricted.
How it works
Wire your source image into images (a COMFY_AUTOGROW_V3 port, so it accepts the connected image), write the edit in prompt, set width and height within the constraints, pick quality, queue. The node uploads the image, submits the instruction through BizyAir, polls, and returns image (IMAGE - the edited result as a normal tensor), request_id (STRING), and urls (STRING). Because the output is a regular IMAGE you can save it, upscale it, or chain it straight into the next node.
api_config (BIZYAIR_OPENAPI_CONFIG) overrides base_url and api_key for a single request; skip_error swaps a failed call for an error placeholder so the workflow doesn't abort.
Install and setup
One-time install, the same across the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/siliconflow/BizyAirPlus.git
cd BizyAirPlus
python -m pip install -r requirements.txt
Restart ComfyUI (or install "BizyAirPlus" via ComfyUI Manager). No model files - the bizyair-cloudberry and bizytrd pip packages auto-install on startup. Click the BizyAirPlus action-bar button to ON, get an API key from bizyair.ai, enter it, and queue.
Common issues
- Dimension errors - the API enforces the multiple-of-16 and pixel-count rules; get one wrong and the request bounces. Check the numbers, not the node.
- Edit rewrites too much - GPT Image edits by regenerating; if you want the rest of the image untouched, say so explicitly in the prompt.
- Filter refusals - OpenAI's guardrails are strict. Rework the request; there's no input here that talks them out of it.
Pack caveat as always: BizyAir auto-installs and sends your images to the cloud. Legitimate SiliconFlow product, but flip the switch OFF for local-only sessions and be deliberate about what you feed it.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | COMFY_AUTOGROW_V3 | — | |
| prompt | STRING | Prompts | |
| width | INT | 1280480–3840 | The dimensions must be a multiple of 16 in both dimensions, with a maximum side length of 3840 pixels, an aspect ratio of 3:1 or less, and a total number of pixels between 655,360 and 8,294,400. |
| height | INT | 720480–3840 | The dimensions must be a multiple of 16 in both dimensions, with a maximum side length of 3840 pixels, an aspect ratio of 3:1 or less, and a total number of pixels between 655,360 and 8,294,400. |
| quality | COMBO | medium | Image quality |
| api_configopt | BIZYAIR_OPENAPI_CONFIG | 单次请求覆盖base_url和api_key | |
| skip_erroropt | BOOLEAN | false | 开启后遇到错误不中断工作流,输出对应类型的错误占位符 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| request_id | STRING | — |
| urls | STRING | — |