GPT Image 2 · Image Editing
Ten Sources, and an `auto` Aspect Ratio That Just Keeps Your Frame
- image_urls
- mask_url
- images
- alpha
- task id
The least fiddly edit node in this pack. Feed it one to ten source images and a description of the change - a garment, a background, a line of type - and by default it keeps the shape of your first source instead of forcing a ratio you never wanted. Optional mask, optional transparency, output anywhere from 1K to 4K, from about $0.001816 an image.
Why the auto default matters more than it sounds
Most image nodes in this pack make you choose an aspect ratio, and if you're editing an existing picture that's a small annoyance: pick 16:9 for a source that's 3:2 and the model has to decide what to do with the difference. This node's aspect_ratio defaults to auto, which specifically means "keep the shape of the first source image". For an edit-the-thing-I-already-have workflow, that's the correct behaviour out of the box, and it's the reason this is the GPT Image edit variant to reach for when you don't want to think.
The bigger claim behind it is the same one the whole GPT Image line rests on: instruction following. The KB's character-consistency research is explicit that between 2025 and 2026 the community stopped trying to make models remember a character and started editing the image they already had, because identity survives when the model is looking at the reference. That's this node's job, and the practical limit is the same for everyone in the category: the model re-emits the whole frame, so unexplained pixels drift and long edit chains accumulate error. Mask when it matters.
The inputs
- prompt - what to change, and what to keep. The second clause does the heavy lifting.
- image_urls - an autogrow socket group, one to ten sources, in the order your prompt refers to them.
- aspect_ratio -
autoby default; explicit ratios if you want them. - resolution -
1kdefault;2kand4kabove. - quality - low, medium or high, defaulting to
medium. Different from the 2.5 nodes, which offer five tiers - this generation has three. - num_outputs - 1 to 10, each billed separately.
- input_fidelity - how closely to hold the source's look. The knob you move when an edit drifts.
- background - background treatment, transparency included.
- output_format -
png, or JPEG/WebP, with output_quality (−1 = model decides, 0–100) applying to the lossy two.
Optional and worth the trouble: mask_url. Transparent pixels mark the repaint area in the first source image. Note the polarity - it's alpha, not a black-and-white mask, so anything you generate elsewhere usually wants inverting first.
Outputs: images, alpha (a MASK, 1 = opaque) and task id. The alpha output pairs nicely with compositing nodes and removes the "how do I get the cutout" step.
Installing it
ComfyUI Manager → SpicyAPI → install → restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi
Restart, then Settings > SpicyAPI → key from spicyapi.ai/console/keys → restart once more so the node list is built from your account. No dependencies install, no weights download, and the pack caches uploads per account for 12 hours by content hash so prompt iteration doesn't re-send your sources. Headless install: use SPICY_API_KEY.
What to expect
Two kinds of no. 40004 means no deployment serves the combination you picked - the message names the offending option, and re-queueing without changing it will fail identically. A task ending content_rejected means the model refused the request; unless that model's page says refusals are billed, it cost you nothing, and no amount of node configuration will change its mind.
On cost: set Max cost per run in Settings > SpicyAPI, and remember the badge on the node is a rate rather than a total - the pack shows "$x per image" deliberately, because an estimate presented as fact is worse than none. Real charges print on the node when a run finishes. There's no seed input, so each run is a fresh result and a fresh charge; use Flare or the non-edit t2i node when you're in exploration mode and want the same image repeatedly.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Say what to change and what must stay the same. | |
| image_urls | COMFY_AUTOGROW_V3 | One to 10 source images, in the order your prompt refers to them. | |
| aspect_ratio | COMBO | auto | Output aspect ratio; auto keeps the shape of the first source image. |
| resolution | COMBO | 1k | Output size tier. |
| quality | COMBO | medium | Rendering quality. Higher tiers add detail, time and cost. |
| num_outputs | INT | 11–10 | How many images to return, each billed separately. |
| input_fidelity | COMBO | low | How closely to keep the look of the source images. |
| background | COMBO | auto | Background treatment of the result. |
| output_format | COMBO | png | File format of the returned images. |
| output_quality | INT | -1-1–100 | Compression quality for JPEG and WebP, from 0 to 100. -1 leaves it to the model. |
| seed | INT | 00–2147483647 | This model takes no seed, so the number is never sent. Changing it makes ComfyUI run the node again: set 'control after generate' to randomize for a new result on every run; every run is billed. |
| mask_urlopt | IMAGE | Optional PNG mask: transparent pixels mark the area to repaint in the first source image. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| alpha | MASK | Transparency of each image: 1 is opaque. |
| task id | STRING | The SpicyAPI task id, for the console logs or support. |