Zhenzhen_gpt_image_2
The Comfly polling node
- image1
- image2
- image3
- image4
- images
- response
- image_urls
- chats
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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| api_keyopt | STRING | — | |
| modelopt | COMBO | gpt-image-2 | 4 options: gpt-image-2, gpt-image-2-all, gpt-image-2-2K, gpt-image-2-4K |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| qualityopt | COMBO | auto | 4 options: auto, high, medium, low |
| sizeopt | COMBO | auto | 4 options: auto, 1024x1024, 1536x1024, 1024x1536 |
| backgroundopt | COMBO | auto | 3 options: auto, transparent, opaque |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
| moderationopt | COMBO | auto | 2 options: auto, low |
| seedopt | INT | 00–18446744073709550000 | — |
| clear_chatsopt | BOOLEAN | true | — |
| image_download_timeoutopt | INT | 600120–1200 | — |
| skip_erroropt | BOOLEAN | false | 开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| response | STRING | — |
| image_urls | STRING | — |
| chats | STRING | — |