Nano Banana Pro
4K Gemini images without running a model
- 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
- image
Let's get the one thing that matters out of the way: this node does not run anything locally. It's a thin, well-made wrapper around Google's Gemini API, and the model it calls by default - gemini-3-pro-image-preview - is Nano Banana Pro, Google's flagship image model. You feed it up to 14 reference images and a prompt, it phones home, and a batch of images comes back as a normal ComfyUI tensor. If you've been watching people get character-consistent multi-image generation and native 4K output out of Google's stack and wondering how to get it into your graph, this is the node.
Why would you reach for it instead of a local checkpoint? Because Nano Banana Pro does things most open models still struggle with: it holds a subject across up to 14 reference images, renders text that's actually legible, and outputs natively at 4K. That's the whole pitch. The cost is that it's a paid API call (roughly $0.04–$0.24 per image depending on resolution), every image carries Google's invisible SynthID watermark, and the censorship is aggressive - the community consensus is "powerful, unimaginative, massive hidden biasing." It's a tool for when the job justifies it, not a daily driver.
How it works
Mechanically it's clean. The node turns each reference image into PNG bytes, packs them into the Gemini request alongside your prompt and system instruction, asks for an IMAGE response, and pulls the images back out of the reply before converting them to a batch tensor. One nice touch: when aspect_ratio is auto it simply omits the field from the request, which avoids the INVALID_ARGUMENT error you'd get from sending it anyway.
For image_count over 1 it loops; flip use_concurrency on and it fans the calls out across a thread pool instead. Expect rate limits - Google throttles concurrent requests, and the README's advice is to drop image_count or turn concurrency off when you see [Nano Banana Pro] Request failed: in the log.
Inputs and outputs that matter
prompt- your actual instruction. Leave it blank and the model just draws from reference images alone.image_1throughimage_14- the reference slots. This is where the character-consistency magic lives.image_count- 1 to 15 images per run.aspect_ratio(auto,1:1,9:16,16:9, etc.) andimage_size(1K/2K/4K) - the shape and resolution.seed,temperature,top_p- the usual knobs.seedof-1means random.api_key- your Google AI Studio key. Leave it blank and it falls back to theGEMINI_API_KEYenvironment variable.
Output is a single image output of type IMAGE - a batch tensor you can preview, save, or feed straight into an upscaler.
The optional *_input ports are an override system: prompt_input, api_key_input, image_count_input and so on let an upstream node feed values in, and an incoming value beats the widget. Useful in a workflow, confusing the first time you see a node doing the opposite of what its panel says.
Installing it
The pack is zhanglongxiao111/Comfyui-geminiapi (a maintained fork of Aryan185's ComfyUI-ExternalAPI-Helpers). Easiest route is ComfyUI Manager - search "Comfyui-geminiapi". Otherwise:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/zhanglongxiao111/Comfyui-geminiapi.git
cd Comfyui-geminiapi
python -m pip install -r requirements.txt
Then restart ComfyUI. The node lives under ExternalAPI/Image/Generation. One real gotcha: the requirements.txt installs the newer google-genai SDK, and the node hard-checks its version - if it's below 1.0.0 the node refuses to load with instructions to run pip install google-genai --upgrade. If you see a load error on first start, that's almost certainly it.
Troubleshooting
The most common failure is the API key not being read - set GEMINI_API_KEY in the terminal that launches ComfyUI, or wire it in via the key port. If a request fails you get a black placeholder frame in the output rather than a crash, plus a logged error, so always check the console before assuming the model generated something intentionally dark. And remember the cost: crank image_count to 15 with concurrency on, and you've just spent a few dollars on one workflow run.
Inputs (29)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| aspect_ratio | COMBO | 11 options: auto, 1:1, 2:3, 3:2, 3:4, 4:3, +5 | |
| temperature | FLOAT | 0.500–1 | — |
| top_p | FLOAT | 0.850–1 | — |
| seed | INT | 69-1–2147483646 | — |
| image_count | INT | 11–15 | — |
| model | STRING | gemini-3-pro-image-preview | — |
| image_size | COMBO | 1K | 3 options: 1K, 2K, 4K |
| promptopt | STRING | — | |
| system_instructionopt | STRING | — | |
| 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 | — | |
| prompt_inputopt | STRING | — | |
| system_instruction_inputopt | STRING | — | |
| api_key_inputopt | STRING | — | |
| image_count_inputopt | INT | 00–15 | — |
| use_concurrencyopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |