🍌 Nano Banana 异步批量提交 (Grsai)
Fire a CSV of jobs into a queue that survives restarts
- image_1
- image_2
- image_3
- image_4
- status
The Grsai side of the pack has a whole async pipeline that the sync Nano Banana nodes don't use, and this is the batch entry point to it. Instead of blocking until every image renders - the way GrsaiNanoBananaBatch does - this node reads a CSV/Excel column, fires the whole batch as submitted jobs, writes them into a local task database, and returns immediately with a status string. Polling and downloading are handled by the pipeline's other nodes (NanoBananaAsyncSubmit / NanoBananaAsyncQuery in the same pack), and here's the part the README brags about for good reason: the task database is a thread-safe JSON store under data/, so a ComfyUI restart or a power cut doesn't lose your queue. Submit now, reboot, come back, resume.
That's the real pitch of async here. Video and 4K image batches take minutes; a blocking node ties up your ComfyUI session for all of them. Async hands the waiting to the task manager.
The inputs that matter
file_path,column_name(defaultprompt),prompt_prefix- the CSV/Excel prompt source, same as the sync batch.model-nano-banana-fast…nano-banana-2-cl; defaultnano-banana-fast.image_size- 默认/1K/2K/4K (4K only maps to Pro/2-class models).aspect_ratio-autoplus the standard set.executions_per_prompt(1–10, default 1) - per-prompt repetition.api_key,image_1…image_4(optional) - reference images shared by the batch.
Output: a single status STRING - the submit receipt with the task ID and how many of N submitted successfully.
How it works
Readable source. The batch POSTs each prompt to the Grsai channel's async draw endpoint (with a zero-width-char suffix per job to keep task IDs distinct), records every returned API task ID as a subtask under a "批量任务N" key in the local TaskManager database, and reports 成功提交: X/N. The heavy lifting you'll notice at runtime: the async submit path carries the pack's circuit breaker - if Auto Queue re-fires the same prompt rapidly, it blocks the submission rather than burn your credits. The query/download nodes then sweep that database and pull finished results.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx
restart (or ComfyUI Manager, "ComfyUI-nkxx"). Auto-installs requests, pandas, openpyxl, yt-dlp, opencv-python, aiohttp. Grsai key from nkxx.grsai.ai.
Common issues
- Submitted but no images yet: expected. This node only queues. Run the query node to sweep status, then the download path to pull finished jobs.
- The queue is empty after a restart? It shouldn't be - that's the point of the JSON task DB - but if it vanished, check the
data/folder under the pack for the history file and that ComfyUI ran with the same working directory. - Credit math is still credit math: async doesn't make renders cheaper; it makes the waiting less annoying.
executions_per_promptstill multiplies the bill.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — | |
| column_name | STRING | prompt | — |
| prompt_prefix | STRING | — | |
| model | COMBO | nano-banana-fast | 6 options: nano-banana-fast, nano-banana-pro, nano-banana-pro-vt, nano-banana-pro-cl, nano-banana-2, nano-banana-2-cl |
| image_size | COMBO | 默认 | 4 options: 默认, 1K, 2K, 4K |
| aspect_ratio | COMBO | auto | 11 options: auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5 |
| executions_per_prompt | INT | 11–10 | — |
| api_keyopt | STRING | — | |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |