Concurrent Submit | zhenzhen-bernini-r-edit-image-fal
The submit half of Zhenzhen's concurrent pool
- image
- task
The normal zhenzhen-bernini-r-edit-image-fal node blocks: it submits one image edit, polls until it's done, hands you the result, and only then does the queue move on. That's fine for a single shot and genuinely painful when you have a folder of images to process with the same cinematic touch. This node is the fix. It's the submit half of the concurrent system Zhenzhen auto-generates for every image node in the pack - same inputs, same Bernini edit under the hood, but instead of waiting, it drops the job into a shared pool of 30 parallel workers and hands you a task handle immediately.
You don't use this node alone. You wire it into the ComflyConcurrent_Image_Await collector (shown as "Concurrent Collect Images (30)"), which waits for all the tasks in a queue and returns the results in their original slot order. The pattern is: N of these submit nodes (or one submit node per generation, each feeding the collector), then the collector at the end. The pool is what makes it fast - the reads on Reddit about "30 concurrent" refer to this exact mechanism.
How it works
Under the hood this is the same fal-ai/bernini-r/edit-image call as the blocking node, just wrapped in a bounded ThreadPoolExecutor (30 workers for images, 10 for video). Each submit returns a COMFLY_IMAGE_FUTURE - not the image itself, but a promise that will resolve later. The collector takes those promises, waits for the pool to drain, and hands you real IMAGE tensors. Every input is identical to the base node: prompt, image/image_url, api_key, negative_prompt, max_image_size, num_inference_steps, seed (0 = random, FAL caps at 65535), image_way, and the poll settings.
You can tune the pool with two environment variables before launching ComfyUI: COMFLY_IMAGE_CONCURRENCY (default 30) and COMFLY_VIDEO_CONCURRENCY (default 10). Remember this is a metered API - 30 concurrent Bernini edits are 30 paid calls, so the pool's parallelism is your speed, not your discount.
Installing it
It's the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen
Restart ComfyUI, or install "Comfyui-zhenzhen" via ComfyUI Manager. No model downloads - the edits run on hosted Bernini through the Zhenzhen proxy.
Common issues
The usual Zhenzhen pack stuff: you need an account with credit, the overseas API can throw 443 errors (VPN with TUN mode), and 500s on first run are usually upstream - re-run. Concurrency-specific: if the pool is saturated, submit nodes block until a slot frees, so a long video job sharing the same pool can make image submits sit there looking stalled - that's queueing, not a hang. And keep an eye on cost; "concurrent" does not mean "cheap." If a batch partially fails, skip_error on the submit node is what keeps the rest of the queue alive.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Make the image more cinematic. | — |
| imageopt | IMAGE | — | |
| image_urlopt | STRING | — | |
| api_keyopt | STRING | — | |
| negative_promptopt | STRING | — | |
| max_image_sizeopt | INT | 848256–1280 | — |
| num_inference_stepsopt | INT | 301–50 | — |
| enable_prompt_expansionopt | BOOLEAN | false | — |
| seedopt | INT | 00–65535 | 0 = random seed. FAL seed max is 65535. |
| image_wayopt | COMBO | base64 | 2 options: base64, image_url |
| poll_intervalopt | INT | 61–60 | — |
| max_poll_attemptsopt | INT | 60010–3600 | Default 600*6s = 3600s timeout. |
| skip_erroropt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| task | COMFLY_IMAGE_FUTURE | — |