Nodes/Comfyui-zhenzhen/Zhenzhen_gpt_image_2
ComfyUI Node

Zhenzhen_gpt_image_2

The Comfly polling node

By T8mars·Created 12 months ago·Updated about 18 hours ago· 725
Zhenzhen_gpt_image_2
  • image1
  • image2
  • image3
  • image4
  • images
  • response
  • image_urls
  • chats
prompt
api_key
modelgpt-image-2
qualityauto
sizeauto
backgroundauto
output_formatpng
moderationauto
seed0
clear_chatstrue
image_download_timeout600
skip_errorfalse

Want gpt-image-2 output without leaving ComfyUI? Comfly_gpt_image_2 is the pack's newer, cleaner OpenAI image node - a paid API client that sends your prompt to gpt-image-2 through the Comfly relay and, crucially, polls for the result rather than hoping the response comes back in one shot. That polling design is the thing that makes it feel more reliable than the older ComflyChatGPTApi, which is exactly why the author shipped it.

The README dates this node carefully: gpt-image-2 launched with 1:1, 3:2, and 2:3 as its guaranteed aspect ratios. The other sizes in the dropdown - 4:3, 16:9, 9:16, 21:9 - aren't natively supported by the model, so the node silently appends them to the prompt instead, which means the output is approximate and "has randomness." That's an honest quirk worth knowing: pick 1:1 / 3:2 / 2:3 for exact framing, anything else is a roll of the dice.

Inputs that matter

  • prompt - required, multiline.
  • model - currently a single choice, gpt-image-2-all.
  • aspect_ratio - the eight options above; 1:1 default.
  • image1 … image4 - optional reference images for editing or reimagining.
  • webhook - optional; if you have an endpoint, the relay can call it instead of you polling.
  • max_poll_attempts / poll_interval - the polling knobs: how many times to check (default 300) and how long between checks (default 5s). Together that's a ~25-minute ceiling. Leave them alone unless you're babysitting long jobs.
  • seed - 0 for random, or fix it.

Outputs: image (IMAGE), image_url, and response for the raw payload.

Install

The usual Comfly drill:

cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/Comfyui_Comfly

Or ComfyUI Manager → "Comfyui_Comfly" → restart. No models download; you're renting gpt-image-2 by the call. Credits and key from https://ai.comfly.chat (Comflyapi.json or the node's apikey override).

Gotchas

Beyond the aspect-ratio randomness: the README mentions the node line keeps evolving - there's a newer Comfly_gpt_image_2_official variant with more sizes and params for official-API keys, and the older Comfly_gpt_image_2 here is the general-compat path. If your key is from the official groups, the README says to use the official node, not this one - the author is explicit that API groups map to specific nodes. And since this is a relay, a job that times out still cost you a slot; use task_id-style debugging via the response output and don't hammer the queue.

Categoryzhenzhen/Openai

Inputs (16)

NameTypeDefaultDescription
promptSTRING
api_keyoptSTRING
modeloptCOMBOgpt-image-24 options: gpt-image-2, gpt-image-2-all, gpt-image-2-2K, gpt-image-2-4K
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
qualityoptCOMBOauto4 options: auto, high, medium, low
sizeoptCOMBOauto4 options: auto, 1024x1024, 1536x1024, 1024x1536
backgroundoptCOMBOauto3 options: auto, transparent, opaque
output_formatoptCOMBOpng3 options: png, jpeg, webp
moderationoptCOMBOauto2 options: auto, low
seedoptINT00–18446744073709550000
clear_chatsoptBOOLEANtrue
image_download_timeoutoptINT600120–1200
skip_erroroptBOOLEANfalse开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。

Outputs (4)

NameTypeDescription
imagesIMAGE
responseSTRING
image_urlsSTRING
chatsSTRING