Nodes/Comfy Nano Banana/Nano Banana Gemini
ComfyUI Node

Nano Banana Gemini

Run Google's Nano Banana in ComfyUI without a GPU — this node is just the API call

By darkamenosa·Created 12 months ago·Updated 6 months ago· 55
Nano Banana Gemini
  • images
  • images
  • text
prompt
modelNano Banana
batch_size1
seed42
system_prompt
api_key
aspect_ratioauto
image_sizeauto

The name isn't a lie - this node really does run Google's Nano Banana image models, just not on your hardware. No checkpoint downloads, no VRAM math, no ComfyUI CPU grinding. You type a prompt, Google's servers render, and the result lands back in your graph like any other image. The author built it on a MacBook Air M3, which tells you everything about the intended audience: people with weak GPUs (or none) who still want what Nano Banana does well.

That "what it does well" is worth spelling out, because it's the reason to reach for a cloud node at all. Nano Banana's whole party trick is instruction-following and in-image text rendering. As the modidex knowledge base notes, Google's image models are technically impressive but heavily filtered, and all output carries an invisible SynthID watermark. You're trading local control and uncensored output for a model that reliably nails "logo, coffee cup, minimalist, text says NANO BANANA" on the first try. If your prompts are NSFW or close to it, stop here - the API filter is strict and this node can't route around it.

The pickings here: Nano Banana (gemini-2.5-flash-image), Nano Banana Pro (gemini-3-pro-image-preview, 4K native, "thinking mode"), and Nano Banana 2 (gemini-3.1-flash-image-preview). The model dropdown uses those friendly labels, and saved workflows with raw model IDs still load, so nothing breaks if you upgrade.

How it works

Under the hood it's a google-genai client. It normalizes the friendly model label to a real API model ID, sends your prompt (plus any reference images, converted to PIL and sent as multimodal context), and converts the returned image bytes back to a ComfyUI tensor. A few touches are worth knowing:

  • batch_size 1–4 runs concurrently, not sequentially - the async client fires all requests in parallel with a progress bar. Seeds are sequential (seed, seed+1, …).
  • The text output is real. Whatever text the model returns alongside the image comes out as a string; in batch mode it's prefixed with batch/seed info, which makes variation tracking painless.
  • Empty image responses fall back to a tiny placeholder rather than crashing your workflow, so a filtered or failed request won't take the graph down with it.

Inputs and outputs that matter

The required set is small: prompt (multiline), model, batch_size, seed (0–2147483647 - hard 32-bit ceiling, don't fight it).

Then the optional ones, in the order you'll actually use them:

  • api_key - paste a Gemini key, or leave blank to use the GEMINI_API_KEY env var. It's masked in the UI, stripped from regular workflow saves (safe to share), and preserved in API-format exports for automation.
  • images - feed in an image for img2img, style reference, or editing. This is where the pack's Batch Images node earns its keep.
  • system_prompt - steer behavior without touching your main prompt.
  • aspect_ratio - auto or a dropdown from 1:1 up to extreme 8:1 panoramas.
  • image_size - auto / 512px / 1K / 2K / 4K, but only the Gemini 3 models honor it; the 2.5 tier ignores it.

Outputs: images (the generated batch) and text. Wire images into a Preview or Save node and you're done.

Installing it

ComfyUI Manager, search "Nano Banana", install, restart. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/darkamenosa/comfy_nanobanana.git
cd comfy_nanobanana
pip install -r requirements.txt

Dependencies are light - google-genai, Pillow, torch, numpy. No model files, no weights. Then grab a key at Google AI Studio and set it as GEMINI_API_KEY or paste it in the node.

Troubleshooting

  • "No API key provided" - the env var isn't set and the node field is empty. Set one or the other.
  • "exceeded your quota" on first use - the classic. Google has changed Nano Banana's free-tier limits repeatedly, and people hit "quota exceeded" before generating a single image. You usually need a billing account attached to the API project. The free web UI is still free; the API is not.
  • "Seed must be between 0 and 2147483647" - the API rejects 64-bit seeds. Leave control_after_generate on randomize and stop thinking about it.
  • Blank/empty image out - you either picked a non-image model or the API filtered your prompt; the placeholder fallback is doing its job.
  • Prompt silently rejected - that's Google's content filter, not a node bug. No version of this node fixes it.

It costs roughly $0.04 per image at base and climbs with resolution. That's the honest price of skipping the GPU - and for a weak machine it's often the cheaper option than never finishing a local render.

CategoryNano Banana

Inputs (9)

NameTypeDefaultDescription
promptSTRINGText prompt for image generation
modelCOMBONano BananaGemini image model for generation or editing
batch_sizeINT11–4Number of images to generate (1-4)
seedINT420–2147483647Base seed for generation. Sequential seeds used for batch (seed, seed+1, seed+2...)
system_promptoptSTRINGOptional system prompt to guide the model's behavior
imagesoptIMAGEOptional image(s) to use as context or reference
api_keyoptSTRINGGemini API key (leave empty to use GEMINI_API_KEY env variable)
aspect_ratiooptCOMBOautoImage models only. Sets output aspect ratio. 'auto' lets the model decide.
image_sizeoptCOMBOautoGemini 3 image models only. Controls output resolution; ignored for Nano Banana 2.5.

Outputs (2)

NameTypeDescription
imagesIMAGE
textSTRING