GeminiBanana π
Run Nano Banana inside your ComfyUI graph
- images
- text
- image
Nano Banana is one of those models you literally cannot download - Google's Gemini image models are closed, and the only way to use them is through the API. This node is that door, parked inside ComfyUI: type a prompt, get an image tensor back, no local GPU required. It does text-to-image, image-to-image (wire reference images in), and image analysis (the model reads your image and returns text). The banana emoji in the name is the tell: this is a wrapper for Google's Gemini image family, including the "Nano Banana" models.
How it works
It's an API-wrapper node, and that framing matters (external-api-nodes.md covers the whole category). On execution it builds a request with google-genai, sends your prompt and any reference images to Google, and turns the response back into a ComfyUI IMAGE tensor. It needs a Google API key, read from the GEMINI_API_KEY environment variable or pasted into the api_key input - not from a model download. No key means an error string and a gray placeholder image out, not a crash.
The model dropdown is the lineup, and it's worth matching names to products:
gemini-2.5-flash-image- plain Nano Bananagemini-3.1-flash-image-preview- Nano Banana 2 (the speed-quality hybrid)gemini-3-pro-image-preview- Nano Banana Pro (4K native, "thinking mode")
Two operation modes. generate_images is the default; analysis switches the node from producing images to describing them - it sends your images to the model with prompt as the instruction and returns the answer in the text output (the image output becomes a placeholder in that mode). For generation, optional images input turns it into img2img, with reference images downscaled to 1024px before sending and up to max_images of them (default 6). The rest of the knobs: seed, batch_count (1β10, loops API calls with an api_call_delay between them), aspect_ratio presets from 1:1 to 16:9, temperature, and max_output_tokens for the analysis path.
The outputs are text (STRING - a status summary plus any text the model returned) and image (IMAGE - your generated batch).
Installing the pack
Search "Robe Nodes" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/RobeSantoro/ComfyUI-RobeNodes
Restart ComfyUI. This is the node that justifies the pack's google-genai dependency, and Manager installs it. Then get a key from Google AI Studio and either set GEMINI_API_KEY in your environment or paste it into the node.
Where people get burned
- No key β gray box. Check the
textoutput - the error message lives there, not in the console. - The filter is the model's, not the node's. The node even sets safety thresholds to BLOCK_NONE, but Google's Nano Banana line is aggressively censored at the source - the node cannot and does not bypass that. Don't expect Spicy-Mode behavior here.
- Cost. This is metered per call, and video-length batches at
batch_count10 add up fast. Theapi_call_delayexists because you will hit rate limits. - Key hygiene. If you paste the key into the widget, it gets baked into the workflow JSON - which ComfyUI embeds in every saved PNG. Prefer the environment variable, because otherwise you're shipping your key inside your output files.
And the honest security note that applies to every node like this: it's a small personal pack whose whole job is phoning home with your key. Read the source before you trust it - it's MIT-licensed and only ~400 lines, which is exactly the length you should glance at before wiring credentials into it. For a model you can't run locally, that's the price of admission.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | β | |
| operation_mode | COMBO | generate_images | 2 options: generate_images, analysis |
| model_name | COMBO | gemini-2.5-flash-image | 3 options: gemini-2.5-flash-image, gemini-3.1-flash-image-preview, gemini-3-pro-image-preview |
| temperature | FLOAT | 0.800β1 | β |
| imagesopt | IMAGE | β | |
| api_keyopt | STRING | β | |
| seedopt | INT | 00β4294967295 | β |
| batch_countopt | INT | 11β10 | β |
| aspect_ratioopt | COMBO | none | 6 options: none, 1:1, 16:9, 9:16, 4:3, 3:4 |
| max_imagesopt | INT | 61β16 | β |
| max_output_tokensopt | INT | 81921β32768 | β |
| api_call_delayopt | FLOAT | 1.00β60 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |
| image | IMAGE | β |