Nodes/ComfyUI-nkxx/🍌 Nano Banana 异步批量提交 (Grsai)
ComfyUI Node

🍌 Nano Banana 异步批量提交 (Grsai)

Fire a CSV of jobs into a queue that survives restarts

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
🍌 Nano Banana 异步批量提交 (Grsai)
  • image_1
  • image_2
  • image_3
  • image_4
  • status
file_path
column_nameprompt
prompt_prefix
modelnano-banana-fast
image_size默认
aspect_ratioauto
executions_per_prompt1
api_key

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 (default prompt), prompt_prefix - the CSV/Excel prompt source, same as the sync batch.
  • model - nano-banana-fastnano-banana-2-cl; default nano-banana-fast.
  • image_size - 默认/1K/2K/4K (4K only maps to Pro/2-class models).
  • aspect_ratio - auto plus the standard set.
  • executions_per_prompt (1–10, default 1) - per-prompt repetition.
  • api_key, image_1image_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_prompt still multiplies the bill.
CategoryNkxx/Grsai/图像异步

Inputs (12)

NameTypeDefaultDescription
file_pathSTRING
column_nameSTRINGprompt
prompt_prefixSTRING
modelCOMBOnano-banana-fast6 options: nano-banana-fast, nano-banana-pro, nano-banana-pro-vt, nano-banana-pro-cl, nano-banana-2, nano-banana-2-cl
image_sizeCOMBO默认4 options: 默认, 1K, 2K, 4K
aspect_ratioCOMBOauto11 options: auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5
executions_per_promptINT11–10
api_keyoptSTRING
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE

Outputs (1)

NameTypeDescription
statusSTRING