Nano Banana (Vertex AI)
The reference-image Gemini model, on Vertex AI
- image_1
- image_2
- image_3
- image_4
- image_5
- image
"Nano Banana" started as an anonymous codename on the HuggingFace leaderboard, then Google executives started posting banana emojis, and the name stuck. It's Google's Gemini-native image generation - the lineup that includes the 4K-native Pro tier - and this node gives it to you with your own Vertex credentials instead of a subscription. Its party trick is reference-image editing: feed it up to five images and a prompt, and it'll keep a face, a style, or a product consistent across generations.
What it is
An image/generation node that calls Gemini's image models. The model dropdown spans three tiers: gemini-3-pro-image-preview (the Pro/4K one), gemini-2.5-flash-image (the classic Nano Banana), and gemini-3.1-flash-image-preview (the speed-quality hybrid). What makes it different from the Imagen Generate node in this pack is the reference images: image_1 through image_5 are all optional, and together with a prompt they let you do makeup transfer, character consistency, or "restyle this product" style edits. The prompt itself is optional too - hand it an image and it can work from that alone.
How it works
The node builds a multi-part request: each provided image becomes a PNG part, the prompt is appended, and everything goes to Gemini's generate_content with response_modalities=["IMAGE"]. Resolution and aspect ratio are set via an image config - and worth noting, the full 4K resolution option only applies to the Pro model. Responses come back as image bytes, decoded straight into an IMAGE tensor.
The inputs that matter
The credential trio, same as every node in this pack: project_id, location, service_account. And the pack-wide reminder: paste the contents of your JSON key file, not a path - the README's "path" wording is wrong.
image_1...image_5- reference images. This is the whole reason you'd choose Nano Banana over Imagen.prompt- optional text direction.aspect_ratio- eight options, from 1:1 out to 21:9.resolution- 1K / 2K / 4K (4K is Pro-only).google_search- lets the model pull web context. The node will quietly ignore this on models that don't support it, so don't assume it's working.system_instruction,temperature,top_p,seed- the usual supporting cast.
Outputs
image - a single IMAGE. Wire it to preview, save, or feed back into another generation as a reference.
Installing
cd ComfyUI/custom_nodes/
git clone https://github.com/Aryan185/ComfyUI-VertexAPI.git
cd ComfyUI-VertexAPI
pip install -r requirements.txt
Restart ComfyUI, or install ComfyUI-VertexAPI via ComfyUI Manager.
Where people get burned
Set expectations before you bill anything. The community's verdict on Nano Banana is "powerful, unimaginative, massive hidden biasing" - technically impressive, aggressively safety-filtered, and stubborn about what it will generate. January 2026 tightened the filters further on celebrities and famous IP. If you're coming from a local checkpoint that does what you ask, the refusals will feel personal. There's also a fair bit of community skepticism about closed cloud services here - the author behind this pack (Aryan185) also maintains an External API Helpers pack that runs Nano Banana through the plain Gemini API, and both routes carry the same cloud cost. Reference-image editing is where this node genuinely shines; if you're just doing text-to-image, the cheaper Imagen node in this pack will often do.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| project_id | STRING | — | |
| location | COMBO | us-central1 | 40 options: global, us-central1, us-east1, us-east4, us-east5, us-south1, +34 |
| service_account | STRING | — | |
| model | COMBO | 4 options: gemini-3-pro-image, gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-3.1-flash-lite-image | |
| aspect_ratio | COMBO | 8 options: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, +2 | |
| resolution | COMBO | 1K | 3 options: 1K, 2K, 4K |
| temperature | FLOAT | 0.500–1 | — |
| top_p | FLOAT | 0.850–1 | — |
| google_search | BOOLEAN | false | — |
| seed | INT | 69-1–2147483646 | — |
| system_instructionopt | STRING | — | |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |