Nano Banana 2 AIO
Google's fastest image model, wired into ComfyUI
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- image_10
- image_11
- image_12
- image_13
- image_14
- images
- thinking
- grounding_sources
The name sounds like a prank, but this node is the real thing: it drops Google's fastest Gemini image model - Nano Banana 2 (gemini-3.1-flash-image-preview) - straight into your ComfyUI graph. It's one of four nodes in the ru4ls/ComfyUI_Nano_Banana pack and the speed-and-volume option: Nano Banana 2 launched back in February 2026 as the high-efficiency workhorse of Google's image lineup.
Here's the part people get wrong: nothing runs locally. There's no checkpoint to download, no GPU work, no vram pressure. The node ships your prompt and any reference images to Google's API and gets a finished image back. That means it costs real money per image and it needs credentials - but the quality ceiling is whatever Nano Banana 2 can do, not whatever your 8GB card can run.
Why you'd reach for it
Nano Banana's family tree has a Pro flagship and a fast sibling, and this node is the fast one. If you're iterating - a dozen variations of a product shot, a storyboard at weird aspect ratios, a batch of reference-true images for a character - this is the node to grab. It's the biggest surface of the "Nano Banana 2" side of the pack: up to 14 reference images (the model treats roughly 10 as high-fidelity object references and 4 as character references), Google Image Search grounding on top of plain web search, a 512px output option that the Pro model doesn't offer, and extreme aspect ratios like 1:8 and 8:1.
How it works
The mechanism is straightforward once you accept the cloud thing. The pack reads a .env file at ComfyUI startup - either a GOOGLE_API_KEY or a PROJECT_ID + LOCATION pair - and auto-detects which to use. When you run the node it converts any connected IMAGE tensors into PIL images, builds a GenerateContentConfig with text-plus-image response modalities, your aspect ratio, size and temperature, and (if you toggle it) attaches a Google search tool. One detail worth knowing: the code explicitly disables automatic function calling because it caused a MALFORMED_FUNCTION_CALL error on the earlier Pro preview model - that was the fix in pack v6.0.1. The returned image bytes come back into ComfyUI as a normal IMAGE tensor, ready for PreviewImage or SaveImage.
The inputs that matter
You don't set most of this. The ones a beginner actually touches:
prompt- the whole job. Multiline, so describe freely.use_searchanduse_image_search- web grounding and image grounding;use_image_searchdoes nothing unlessuse_searchis also on, and both default to off here (the Pro AIO node defaults search on, same pack).image_1throughimage_14- optional reference images fromLoadImage. Give at least one for image-to-image work.aspect_ratio- includes the NB2-exclusive extremes1:4,1:8,4:1,8:1, plusAutowhich lets the model pick.image_size-512px,1K,2K,4K. The512pxoption is exclusive to Nano Banana 2 and is quietly great for cheap rapid drafts.image_count- 1 to 10; with more than 1 the node generates that many sequential images.
Outputs: images (the IMAGE batch), thinking (the model's reasoning, only really populated via Vertex AI), and grounding_sources (citation URLs). One honest caveat from the README: on the plain API-key path, thinking and grounding_sources just return messages telling you to set up Vertex AI for the full experience.
Installing
This node ships inside the ComfyUI_Nano_Banana pack. Easiest route is ComfyUI Manager - search "ComfyUI_Nano_Banana" and install. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ru4ls/ComfyUI_Nano_Banana.git
pip install -r ComfyUI_Nano_Banana/requirements.txt
pip install google-genai --upgrade # required for Nano Banana 2 nodes
Then set up credentials. The simplest path is a Google AI Studio API key:
cd ComfyUI/custom_nodes/ComfyUI_Nano_Banana
cp .env.api.template .env # then paste your GOOGLE_API_KEY
The pack deliberately skips its own torch, numpy and Pillow dependencies, assuming ComfyUI already has them - sensible, since it avoids version fights.
Gotchas
- It's paid. Every image costs something on your Gemini bill, and 14 references plus search add up per call.
- Censorship. The whole Nano Banana line is known for aggressive safety filtering - the KB sums up the community verdict as "powerful, unimaginative, massive hidden biasing." Don't plan a workflow that needs anything spicy; it will just refuse.
- Everything carries a SynthID watermark, invisible but detectable.
- Old
google-genaibreaks the NB2 nodes - if you get SDK-related errors, run the--upgradeline above first.
If you want the highest quality rather than the fastest, grab the NanoBananaAIO node from the same pack - that's the Pro model. This one is for volume.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | gemini-3.1-flash-image-preview | 1 options: gemini-3.1-flash-image-preview |
| prompt | STRING | A futuristic nano banana dish | — |
| image_count | INT | 11–10 | — |
| use_search | BOOLEAN | false | — |
| use_image_search | BOOLEAN | false | — |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — | |
| image_7opt | IMAGE | — | |
| image_8opt | IMAGE | — | |
| image_9opt | IMAGE | — | |
| image_10opt | IMAGE | — | |
| image_11opt | IMAGE | — | |
| image_12opt | IMAGE | — | |
| image_13opt | IMAGE | — | |
| image_14opt | IMAGE | — | |
| aspect_ratioopt | COMBO | 1:1 | 15 options: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, +9 |
| image_sizeopt | COMBO | 2K | 4 options: 512px, 1K, 2K, 4K |
| temperatureopt | FLOAT | 1.00–2 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| thinking | STRING | — |
| grounding_sources | STRING | — |