Concurrent Submit | Zhenzhen Gemini 3.1 Flash Image Edit S2A
Nano Banana 2 family edits, with async task recovery
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- task
Gemini 3.1 Flash image is the model behind the "Nano Banana 2" wave - Google's fastest image editor, and the one people actually use in production because it's cheap, quick, and genuinely good at following edit instructions. The S2A in this node's name is the differentiator: it's the sync-to-async variant, which means the job runs as an asynchronous task on the author's server that you can look up later by ID. That's a lifesaver when ComfyUI times out mid-download or a render succeeds server-side while your client gives up - the README's whole S2A design is built around "the task is done, go find it in the async task list."
The Comfyui-zhenzhen pack resells Google's image API with its own key, and this concurrent submit version lets you queue a batch of these edits at once.
How it works
The regular node blocks until Google answers. The Submit variant runs it in the pack's shared image pool (30 workers) and returns a task immediately. Collect via Concurrent Collect Images (30): wire task_1 … and the collector waits, returning images in slot order plus a status string. failure_mode = fail-fast (default) or placeholder.
The async angle matters when a job gets slow: because it's S2A, the server-side task keeps running and you can pull it from the shop's async-task page with the task ID rather than re-spending credits on a rerun.
The inputs that matter
prompt(required) - your edit instruction.mode-text2imgorimg2img. Flip to img2img and connect reference images.model-gemini-3.1-flash-image(default) orgemini-3.1-flash-lite-image. Lite is capped at 1K per the README - Google decided that, not the author.aspect_ratio- a big list: auto, 16:9 → 9:21, plus four more.image_size- 1K / 2K / 4K. The higher you go the more credits and the more Google rate-limits bite.image1…image14- up to fourteen reference images for multi-image edits.task_id- the recovery slot: paste a previous job's ID to pull its result instead of re-rendering.response_format-urlorb64_json. If you're handling many reference images, the README suggests URL to keep the request light.
Output: one task (COMFLY_IMAGE_FUTURE) → Collector → edited images.
Installing it
Ships in Comfyui-zhenzhen:
- ComfyUI Manager → Install Custom Nodes → search "Comfyui-zhenzhen" → install → restart.
- Or
cd ComfyUI/custom_nodes && git clone https://github.com/T8mars/Comfyui-zhenzhenand restart.
No model downloads; you need a paid token from the author's storefront (ai.t8star.org), in api_key.
Gotchas
Google's rate limiting is the recurring theme in the README: 429 and 500 on these models are usually Google's load caps, not your fault, and they don't necessarily charge you on failure. For 2K/4K stability the author recommends the "优质" (premium) token group for this model family, since the cheap default group is where white-image failures live. If a job says it failed but the task actually completed, the async task list - reachable via task_id - is your refund-free recovery path. And 4K is where Google's wind control gets aggressive, so match your token group to the resolution you're chasing.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| mode | COMBO | text2img | 2 options: text2img, img2img |
| model | COMBO | gemini-3.1-flash-image | 2 options: gemini-3.1-flash-image, gemini-3.1-flash-lite-image |
| aspect_ratio | COMBO | auto | 16 options: auto, 16:9, 4:3, 4:5, 3:2, 1:1, +10 |
| image_size | COMBO | 2K | 3 options: 1K, 2K, 4K |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — | |
| image9opt | IMAGE | — | |
| image10opt | IMAGE | — | |
| image11opt | IMAGE | — | |
| image12opt | IMAGE | — | |
| image13opt | IMAGE | — | |
| image14opt | IMAGE | — | |
| apikeyopt | STRING | — | |
| task_idopt | STRING | — | |
| response_formatopt | COMBO | url | 2 options: url, b64_json |
| seedopt | INT | 00–2147483647 | — |
| skip_erroropt | BOOLEAN | false | 开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| task | COMFLY_IMAGE_FUTURE | — |