FL Gemini Image Gen ADV
Batch image generation and editing with Google Gemini
- image_1
- images
- API_responses
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 raiseinputcount) - 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 currentgemini-2.5-flash-image. The dropdown includes the newer preview tiers too.aspect_ratioandimage_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: 50at4Kis 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_responsesfirst - 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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 11–100 | — |
| api_key | STRING | — | |
| model | COMBO | models/gemini-2.5-flash-image | 5 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_ratio | COMBO | 1:1 | 10 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4 |
| image_size | COMBO | 1K | Resolution size (2K/4K only supported by gemini-3-pro-image-preview) |
| always_square | BOOLEAN | false | — |
| temperature | FLOAT | 1.000–2 | — |
| max_retries | INT | 31–5 | — |
| prompt_1 | STRING | Describe image 1 | — |
| image_1opt | IMAGE | — | |
| seedopt | INT | 00–16777215 | — |
| retry_indefinitelyopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| API_responses | STRING | — |