Nodes/PopNow/GPT Image 2 · Edit
ComfyUI Node

GPT Image 2 · Edit

The auto aspect ratio nobody tells you about

By popnow-ai·Created 24 days ago·Updated about 20 hours ago· 0
GPT Image 2 · Edit
  • image_urls
  • mask_url
  • images
  • alpha
  • task id
◄prompt►
◄aspect_ratioauto►
◄resolution1k►
◄qualitymedium►
◄num_outputs1►
◄input_fidelitylow►
◄backgroundauto►
◄output_formatpng►
◄output_quality-1►

Here's a small thing that changes how you'd use this node: its aspect_ratio defaults to auto, and auto keeps the shape of your first source image. Every other edit node in the pack defaults to a fixed ratio, which means you crop or reframe without meaning to. For "restyle this photo, same framing", that difference is the whole ballgame.

What it is

The edit endpoint for GPT Image 2, OpenAI's previous image generation, wrapped as a node by the PopNow pack. Starting at about 0.27 credits ($0.0027) per image. It's not the newest model in the catalog - 2.5 Flare and Sunburst sit above it - but it's stable, it takes up to ten source images, and it still does the thing the GPT Image line is known for: instructions followed literally and text that's actually readable.

Like every node in this pack it's a network call. Source images and prompts go to PopNow and on to OpenAI, subject to OpenAI's filter, billed per image. No weights, no local alternative.

How it works

Sources go into image_urls, an Autogrow socket that grows a slot per connection up to ten. The node encodes each to PNG (JPEG if it would exceed 10 MiB), uploads them with a content-hash cache good for 12 hours, and sends the edit request with your prompt and settings. The result comes back as an IMAGE batch, with the transparency of each image exposed on the alpha output as a MASK.

That alpha output is worth wiring even when you don't think you need it. It's the cheapest way to check whether the model actually produced an opaque image or quietly left holes, and it's what you feed into a compositor when you did ask for a cut-out.

The inputs

  • prompt - say what to change and what must stay the same. Both halves. "Change the background to a grey studio sweep, keep the product exactly as it is, keep the label legible" is the kind of instruction this model respects.
  • image_urls - one to ten sources, in the order your prompt refers to them.
  • aspect_ratio - default auto, which follows the first source. Set a fixed ratio only when you want the reframe.
  • mask_url (optional) - a PNG whose transparent pixels mark the area to repaint in the first source image.
  • input_fidelity - low by default, high to hold onto more of the source's look. For a restyle, low. For a faithful edit, high.
  • quality - medium by default on this model (the 2.5 nodes default to high).
  • resolution - 1k, 2k, 4k tiers.
  • num_outputs - 1 to 10, billed per image.
  • background - auto by default.
  • output_format, output_quality - png default; JPEG/WebP quality 0–100 or -1.

Outputs: images, alpha, task id.

What I'd actually use it for

Photo restyling and product variants. The auto aspect ratio plus a strong preservation instruction makes it behave like a very obedient retoucher: keep the frame, keep the object, change the light. It's also decent for multi-source compositing - two or three reference images plus a clear "put the object from the second image into the scene in the first" gets better results than most people expect from a text-to-image model.

What it isn't good for: generating from nothing (use a text-to-image node), or anything the filter dislikes. You can't patch a closed model, and no clever prompt changes that.

Install

Manager → search PopNow → Install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/popnow-ai/popnow-comfyui

Restart, add a key from popnow.ai/api/console/keys in Settings > PopNow, restart again. Nothing else to install; pyproject.toml declares no dependencies.

Traps

A PopNow 400 naming a field means those settings aren't servable together - an unusual aspect ratio at 4K, most often. PopNow 40201 is credits. PopNow content_rejected means the filter declined and the run is refunded.

Two workflow traps specific to masks: mask_url targets the first image only, and a mask with no transparent region tells the model to repaint everything, which reads as a broken edit. Sketch the mask, check it in an image viewer, then wire it in. Two minutes there saves a queue of confusing re-rolls.

CategoryPopNow/Image/OpenAI

Inputs (11)

NameTypeDefaultDescription
promptSTRINGSay what to change and what must stay the same.
image_urlsCOMFY_AUTOGROW_V3One to 10 source images, in the order your prompt refers to them.
aspect_ratioCOMBOautoOutput aspect ratio; auto keeps the shape of the first source image.
resolutionCOMBO1kOutput size tier.
qualityCOMBOmediumRendering quality. Higher tiers add detail, time and cost.
num_outputsINT11–10How many images to return, each billed separately.
input_fidelityCOMBOlowHow closely to keep the look of the source images.
backgroundCOMBOautoBackground treatment of the result.
output_formatCOMBOpngFile format of the returned images.
output_qualityINT-1-1–100Compression quality for JPEG and WebP, from 0 to 100. -1 leaves it to the model.
mask_urloptIMAGEOptional PNG mask: transparent pixels mark the area to repaint in the first source image.

Outputs (3)

NameTypeDescription
imagesIMAGE—
alphaMASKTransparency of each image: 1 is opaque.
task idSTRINGThe PopNow task id, for the API console logs or support.