Nodes/ComfyUI-nkxx/🍌📂 Grsai 文件夹批量处理(CSV)
ComfyUI Node

🍌📂 Grsai 文件夹批量处理(CSV)

A whole folder of images, style-shifted with a CSV of prompts

By nkxx188·Created about a year ago·Updated 15 days ago· 14
🍌📂 Grsai 文件夹批量处理(CSV)
  • images
  • images_preview_15
  • status_report
  • output_dir
◄directory_path►
◄csv_file_path►
◄column_nameprompt►
◄modelnano-banana-fast►
◄max_concurrent_files3►
◄aspect_ratioauto►
◄image_size默认►
◄executions_per_prompt1►
◄on_error_action生成原比例白图(保持编号)►
◄fixed_prompt►
◄api_key►

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 (default prompt) - the prompt list. If you leave the CSV blank or broken, the node falls back to fixed_prompt, which runs every image against that one prompt.
  • model - default nano-banana-fast; the …-pro/…-2 family 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.

CategoryNkxx/Grsai/图像

Inputs (12)

NameTypeDefaultDescription
directory_pathSTRING—
csv_file_pathSTRING—
column_nameSTRINGprompt—
modelCOMBOnano-banana-fast7 options: nano-banana-fast, nano-banana-pro, nano-banana-pro-vt, nano-banana-pro-cl, nano-banana-2, nano-banana-2.1, +1
max_concurrent_filesINT31–100—
aspect_ratioCOMBOauto11 options: auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5
image_sizeCOMBO默认4 options: 默认, 1K, 2K, 4K
executions_per_promptINT11–10—
on_error_actionCOMBO生成原比例白图(保持编号)2 options: 生成原比例白图(保持编号), 直接跳过
imagesoptIMAGE—
fixed_promptoptSTRING—
api_keyoptSTRING—

Outputs (3)

NameTypeDescription
images_preview_15IMAGE—
status_reportSTRING—
output_dirSTRING—