Nodes/ComfyUI_Fill-Nodes/FL Gemini Image Gen ADV
ComfyUI Node

FL Gemini Image Gen ADV

Batch image generation and editing with Google Gemini

By filliptm·Created 3 years ago·Updated about 19 hours ago· 628
FL Gemini Image Gen ADV
  • image_1
  • images
  • API_responses
inputcount1
api_key
modelmodels/gemini-2.5-flash-image
aspect_ratio1:1
image_size1K
always_squarefalse
temperature1.00
max_retries3
prompt_1Describe image 1
seed0
retry_indefinitelyfalse

This is Fill-Nodes' bridge to Google's Gemini image model - the "Nano Banana" family everyone's been using for edits and generation - with a batch twist. The "ADV" version lets you set up many prompt/image pairs at once and fires them all off in parallel, so you can generate or edit a whole set of images in one node execution instead of running the graph over and over. It's cloud generation, not local: you bring a Gemini API key, Google does the work, and you get images back as tensors.

Why reach for it? Gemini's image model is strong at prompt-driven editing and following instructions, and doing that inside ComfyUI means the results drop straight into the rest of your graph - upscale them, composite them, feed them into a video node. No round-trip through a separate app.

How it works

You set inputcount to how many prompt/image slots you want (1 to 100), and the node grows that many input pairs. Each pair has its own prompt and an optional image (supply an image to edit it, leave it out to generate from the prompt). On execution it dispatches all of them as asynchronous API calls in parallel and collects the results into a batched list. Because they run concurrently, a batch of 20 isn't 20× the wall-clock time - but it is 20× the API spend.

The inputs that matter

  • api_key - your Gemini key, with billing. Required.
  • inputcount - how many prompt/image pairs to expose (1–100). This is what makes it the "ADV" batch node.
  • prompt_1 (and the dynamic prompts that appear as you raise inputcount) - the instruction for each slot.
  • image_1 (optional, and its dynamic siblings) - the reference/source image for editing that slot. Omit for pure generation.
  • model - which Gemini image model, defaulting to the current gemini-2.5-flash-image. The dropdown includes the newer preview tiers too.
  • aspect_ratio and image_size (1K/2K/4K) - output shape and resolution. Bigger costs more.
  • temperature - creativity/variation of the output.

Outputs are images (a list of the generated/edited images) and API_responses (the raw per-call logs - read these when something's off).

Installing it

Ships in the Fill-Nodes pack. ComfyUI Manager: search ComfyUI_Fill-Nodes, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

then restart. The pack prints a big "Machine Delusions" banner on startup - harmless splash, not an error.

Where people get tripped up

  • Every slot is an API call, and it all bills to your key. inputcount: 50 at 4K is fifty paid generations. The parallelism saves you time, not money. Keep an eye on your Google billing.
  • Key, quota, and region issues are the usual failures. If images don't come back, read API_responses first - it carries the actual error from Google. Model availability by region and per-minute quotas bite here.
  • Editing vs generating is decided by whether you attach an image. Slot with an image = edit that image per the prompt; slot without = generate fresh. If you meant to edit and forgot to wire the image in, you'll get a generation instead.
  • Nothing runs on your GPU. This is a cloud node. VRAM, local checkpoints, samplers - none of it applies. If it's slow, that's Google's queue, not your card.
Category🏵️Fill Nodes/AI

Inputs (12)

NameTypeDefaultDescription
inputcountINT11–100
api_keySTRING
modelCOMBOmodels/gemini-2.5-flash-image5 options: models/gemini-2.0-flash-exp, models/gemini-2.0-flash-preview-image-generation, models/gemini-2.5-flash-image-preview, models/gemini-2.5-flash-image, models/gemini-3-pro-image-preview
aspect_ratioCOMBO1:110 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4
image_sizeCOMBO1KResolution size (2K/4K only supported by gemini-3-pro-image-preview)
always_squareBOOLEANfalse
temperatureFLOAT1.000–2
max_retriesINT31–5
prompt_1STRINGDescribe image 1
image_1optIMAGE
seedoptINT00–16777215
retry_indefinitelyoptBOOLEANfalse

Outputs (2)

NameTypeDescription
imagesIMAGE
API_responsesSTRING