🍌📂 Grsai 文件夹批量处理(CSV)
A whole folder of images, style-shifted with a CSV of prompts
- images_preview_15
- status_report
The other batch direction. GrsaiNanoBananaBatch takes one file of many prompts. This one takes a folder of many images - every .png/.jpg/.jpeg/.webp/.bmp in a directory - and runs img2img on all of them against a CSV column of prompts (or one fixed_prompt), saving each result to a timestamped output folder with per-file naming. If you've got a product line, a character sheet, or a set of concept sketches you want Nano Banana to restyle, this is the node.
It's the most defensive node in the pack, and that's a compliment. The source (readable, Grsai side) validates each file, retries failed generations up to three times, saves under Banana_Batch_<timestamp>/ with Img###_<basename>_P### names, logs every file to batch_error_log.txt, and - the notable part - implements a circuit breaker: ten consecutive failures or a zero-credits signal aborts the whole run and cancels pending tasks instead of burning through your balance on a dead queue. That's the "安全熔断保护" (circuit breaker) the README advertises, and it's a genuinely thoughtful touch for a paid-API batch node.
The inputs that matter
directory_path- the folder of input images. This is your loop variable.csv_file_path+column_name(defaultprompt) - the prompt list. If you leave the CSV blank or broken, the node falls back tofixed_prompt, which runs every image against that one prompt.model- defaultnano-banana-fast; the…-pro/…-2family for quality.max_concurrent_files(1–100, default 3) - how many input images process at once. Modest default, because each image can fan out into multiple prompt renders.executions_per_prompt- prompts × images = jobs.aspect_ratio,image_size- as elsewhere.api_key(optional).
Outputs: images_preview_15 (IMAGE - only the first 15 results, for a peek) and status_report (STRING - the full run ledger, including the note that previews may show black borders while the saved files are clean).
Install & notes
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.
Two real cautions. First, budget: files × prompts × executions is the bill, and a folder with 50 images × 5 prompts is 250 paid renders - the circuit breaker saves you from runaway failure, not from expensive success. Second, this is the strongest demonstration of why the pack pairs closed models with local post-processing: every result lands on your disk in ComfyUI/output/Banana_Batch_<timestamp>/, ready for your local upscaler or detailer to take over.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| directory_path | STRING | — | |
| csv_file_path | STRING | — | |
| column_name | STRING | prompt | — |
| 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 |
| max_concurrent_files | INT | 31–100 | — |
| aspect_ratio | COMBO | auto | 11 options: auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5 |
| image_size | COMBO | 默认 | 4 options: 默认, 1K, 2K, 4K |
| executions_per_prompt | INT | 11–10 | — |
| fixed_promptopt | STRING | — | |
| api_keyopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images_preview_15 | IMAGE | — |
| status_report | STRING | — |