Nodes/Comfyui-zhenzhen/Concurrent Submit | Zhenzhen_gpt_image_2
ComfyUI Node

Concurrent Submit | Zhenzhen_gpt_image_2

Run 30 OpenAI gpt-image-2 jobs at once without melting your graph

By T8mars·Created about a year ago·Updated 2 days ago· 740
Concurrent Submit | Zhenzhen_gpt_image_2
  • image1
  • image2
  • image3
  • image4
  • task
prompt
api_key
modelgpt-image-2
qualityauto
sizeauto
backgroundauto
output_formatpng
moderationauto
seed0
clear_chatstrue
image_download_timeout600
skip_errorfalse

If you're generating with gpt-image-2 through a Zhenzhen node the normal way, your whole graph blocks while ComfyUI waits for OpenAI. Twenty images means twenty round trips, each one stalling the queue. That's what this node kills. It's the same gpt-image-2 call, but instead of running inline it's handed to a shared pool of 30 worker threads that fire in parallel, and you collect everything at the other end.

You'd reach for it when you're batch-testing prompts, doing an edit pass over a set of reference images, or building the kind of "prompt a grid, pick the keepers" workflow that local users do with multiple samplers. The pack's framing for this is honest: gpt-image-2 is a closed model with no open weights, so the only way in is an API, and Zhenzhen is a fan-priced reseller/proxy of it rather than the official ComfyUI Partner Node path.

How it works

The Submit nodes in this pack are auto-generated wrappers. Every input below is identical to the plain Comfly_gpt_image_2 node; the only difference is the output. Instead of an IMAGE, you get a single task output of type COMFLY_IMAGE_FUTURE - a promise, not a picture. The node validates your inputs, then hands the call to a process-wide thread pool (IMAGE_MAX_WORKERS, default 30, tunable via the COMFLY_IMAGE_CONCURRENCY env var) and returns instantly.

That task is useless on its own. You must wire it into ComflyConcurrent_Image_Await, which blocks until every connected task finishes and hands you the images back in slot order (image_1image_30) plus a status JSON string. On the Await node, failure_mode is the interesting knob: fail_fast aborts the whole run the moment any one job fails; placeholder leaves a blank slot and lets the rest complete.

[Submit: gpt-image-2 prompt A] ──task──┐
[Submit: gpt-image-2 prompt B] ──task──┼──▶ ComflyConcurrent_Image_Await ──▶ Save
[Submit: gpt-image-2 prompt C] ──task──┘

Inputs that matter

The essential set is small. prompt is required and the only thing you can't skip. api_key defaults to whatever's stored in the pack config, so you can leave it blank once you've set up API Settings. model matters more than people expect - gpt-image-2 is the base, gpt-image-2-2K and gpt-image-2-4K are the higher-resolution variants, and which one actually works depends on the token group you picked on Zhenzhen's site, not just the dropdown. quality (auto/high/medium/low) and size (auto, 1024x1024, 1536x1024, 1024x1536) are what you'll fiddle with most.

For editing, plug up to four image1image4 inputs and describe the change in prompt. clear_chats controls multi-turn context: true (default) edits only what you feed in, false lets later calls reference earlier generations. background (auto/transparent/opaque) and output_format (png/jpeg/webp) cover the transparency use cases. image_download_timeout (default 600s) is worth raising if big 4K downloads keep dying mid-graph.

How to install

Install once, use for all 30 Submit variants in the pack. ComfyUI Manager → Custom Nodes → search Comfyui-zhenzhen (or "zhenzhen"), install, restart. Or:

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

No model files - nothing runs locally. The heavy deps (aiohttp, openai, transformers, opencv-python, GitPython…) get pulled in automatically. You still need a Zhenzhen API key from the site, and you'll want the pack's API Settings node so you don't paste keys into every submit node.

Common issues

The usual suspects here are upstream, not your graph. A 500 mid-run usually means OpenAI is resource-constrained - the pack's own changelog says a lot of "system error" responses are just upstream load, and re-running clears most of them. 2K/4K results coming out as 1K, or failing entirely, almost always means your token group on the site doesn't match the model - the README is explicit that the default group and the premium (优质) group behave differently per model. And if the Await node shows a slot as failed but the media clearly exists, check the async-task page on the site: the poll may have timed out right after the render finished.

One thing to remember: this node sits in the third-party-reseller layer of the API-node ecosystem, and that layer is exactly where a credential-carrying network node deserves a little caution. It's a widely-installed open pack, but read it before you trust it with a key you care about.

Categoryzhenzhen/Openai/Concurrent Submit

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 (1)

NameTypeDescription
taskCOMFLY_IMAGE_FUTURE