Nodes/Comfyui-zhenzhen/Zhenzhen_gpt_image_1_edit
ComfyUI Node

Zhenzhen_gpt_image_1_edit

Ten images, ten masks, and multi-turn chats

By T8mars·Created about a year ago·Updated 2 days ago· 740
Zhenzhen_gpt_image_1_edit
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • image8
  • image9
  • image10
  • mask1
  • mask2
  • mask3
  • mask4
  • mask5
  • mask6
  • mask7
  • mask8
  • mask9
  • mask10
  • edited_image
  • response
  • chats
prompt
api_key
modelgpt-image-1
n1
qualityauto
sizeauto
seed0
clear_chatstrue
backgroundauto
output_compression100
output_formatpng
max_retries5
initial_timeout900
input_fidelitylow
partial_images0
skip_errorfalse

The edit side of GPT Image 1, and the first thing you'll notice is how many wires it has. Comfly_gpt_image_1_edit accepts up to ten input images and ten masks, which covers everything from a quick inpaint to a multi-image scene assembly. And then there's the party trick the plain generation node doesn't have: it keeps a conversation. The chats output carries the multi-turn context, so with clear_chats set to false you can run the node, see the result, tweak the prompt, and run it again on the same context - a genuine iterate-in-place loop instead of starting from scratch each time.

This is the node to reach for when GPT Image's text rendering plus reference images plus "keep going with this same scene" is exactly the workflow you need.

Inputs worth knowing

  • image1image10 and mask1mask10 - the edit material. Masks are MASK tensors, so wire in a mask from an inpainting prep workflow. With a mask, the edit is localized; without one, the model edits the whole image.
  • prompt - the instruction. "Replace the sign text with 'OPEN' in red," "add a mug on the desk."
  • clear_chats - the multi-turn switch. true (default) = each run is fresh; false = keep context so a follow-up prompt edits the last result. Set it false and feed the chats output back into the node's context to chain.
  • model - gpt-image-1 or gpt-image-1.5.
  • input_fidelity - low or high. High fidelity hews closer to your input image; low gives the model more creative room. The changelog shows this was added specifically to control how closely edits track the source.
  • partial_images - 03, how aggressively the model can regenerate parts rather than keep them. Higher = more freedom.
  • n, quality, size, background, output_format, output_compression (0–100), max_retries, initial_timeout round it out.

Outputs: edited_image (IMAGE), response (JSON), and chats (the multi-turn context to feed back in).

Install and key

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen

Restart, or ComfyUI Manager → "Comfyui-zhenzhen". Same shared setup: key from ai.t8star.org, no model downloads.

The usual suspects

The cheap reverse-engineered token group is slow and flaky; use an official group for anything you can't afford to re-run. Ten images plus masks is ten uploads' worth of data leaving your machine - fine for your own work, worth a pause for client assets. And if you ever feel like the model "ignored" your mask, check that the mask tensor is actually paired to the right image slot. Everything else is the standard relay playbook: transient 500s re-run clean, and the meter runs per edit.

Categoryzhenzhen/Openai

Inputs (36)

NameTypeDefaultDescription
promptSTRING
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE
image7optIMAGE
image8optIMAGE
image9optIMAGE
image10optIMAGE
mask1optMASK
mask2optMASK
mask3optMASK
mask4optMASK
mask5optMASK
mask6optMASK
mask7optMASK
mask8optMASK
mask9optMASK
mask10optMASK
api_keyoptSTRING
modeloptCOMBOgpt-image-12 options: gpt-image-1, gpt-image-1.5
noptINT11–10
qualityoptCOMBOauto4 options: auto, high, medium, low
sizeoptCOMBOauto4 options: auto, 1024x1024, 1536x1024, 1024x1536
seedoptINT00–18446744073709550000
clear_chatsoptBOOLEANtrue
backgroundoptCOMBOauto3 options: auto, transparent, opaque
output_compressionoptINT1000–100
output_formatoptCOMBOpng3 options: png, jpeg, webp
max_retriesoptINT51–10
initial_timeoutoptINT90060–1200
input_fidelityoptCOMBOlow2 options: low, high
partial_imagesoptCOMBO04 options: 0, 1, 2, 3
skip_erroroptBOOLEANfalse开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。

Outputs (3)

NameTypeDescription
edited_imageIMAGE
responseSTRING
chatsSTRING