ComfyUI Node

Nano Banana (Pro) V3

Google's Nano Banana, piped straight into your ComfyUI graph

By darrell-goh·Created 7 months ago·Updated 7 months ago· 1
Nano Banana (Pro) V3
  • image_1
  • image_2
  • image_3
  • Text Output
  • Image
  • Stats
  • Thoughts
system_promptYou are a master artist and expert at digital art.
user_message_boxCombine all the input images with a background of your envisioning in the year 2050.
modelgemini-3-pro-image-preview
image_generationtrue
resolution4K
aspect_ratioAuto
temperature1.0
timeout300

The whole pitch of this node fits in one sentence: it puts Google's Nano Banana image models inside a ComfyUI graph, so a closed API model you'd normally fight in a browser tab becomes just another node in your workflow. No weights to download, no VRAM to worry about - it makes a call to Vertex AI and hands the result back as a regular IMAGE tensor. If your workflow already lives in ComfyUI and you want Gemini's 4K output and text rendering without leaving the canvas, this is the bridge.

Quick naming sanity check first, because this one confuses everyone. "Nano Banana" is Google's rebrand of its Gemini image generation - the name started as an anonymous codename on a HuggingFace leaderboard, Google's execs started posting banana emojis, and the branding stuck. This node talks to Nano Banana Pro (Gemini 3 Pro Image) and Nano Banana (Gemini 2.5 Flash Image). The "V3" in the node's name has nothing to do with the model - it means the node is written against ComfyUI's newer V3 backend API, the io.ComfyNode / define_schema() / comfy_entrypoint() style. Hence the ComfyUI 0.3.x+ requirement, and the legacy ComfyUI-NanoBanana_node pack the author keeps for older installs.

What it actually does

Mechanically it's straightforward: the node base64-encodes any images you connect, builds a generateContent request, POSTs it to Vertex AI over aiohttp, and decodes the PNG that comes back into a tensor. The interesting part is that it's an async node - ComfyUI wraps the execute() call in an asyncio.Task, so independent Nano Banana nodes run their API requests concurrently instead of one-at-a-time. That's the whole reason this pack exists: batch of four character-sheet edits? All four calls fire in parallel, and the total wall time drops to roughly the slowest single request.

Configuration is all environment variables, not widgets. You either point it at a Nano Banana proxy endpoint (VERTEX_AI_USE_SIMPLE_ENDPOINT=true plus VERTEX_AI_ENDPOINT), or at plain Vertex AI with VERTEX_AI_PROJECT and VERTEX_AI_LOCATION. VERTEX_AI_MODELS is a comma-separated list that becomes your model dropdown, and VERTEX_AI_API_KEY is the key that everything falls over without.

The inputs and outputs that matter

You don't need to touch most of the panel to get good results. The ones that actually matter:

  • user_message_box - your actual instruction to the model. The default ("Combine all the input images...") is just a demo prompt; replace it.
  • resolution - 1K / 2K / 4K, default 4K. Nano Banana Pro is native 4K, so this is the flagship setting - but remember it's priced per image, and 4K costs the most.
  • aspect_ratio - Auto (default) detects the ratio from your first input image; the presets (16:9, 9:16, 3:2, ...) override it.
  • image_1image_3 are always visible; connect them all and the node grows dynamic image_4image_14 slots as you go. Nano Banana Pro officially handles up to 14 reference images.

Outputs: Image (the generated tensor - wire this into a save node or downstream processing), Text Output (any text the model returns), Stats (a TPS/token string), and Thoughts (the model's reasoning, for supported models). The node also paints processing time and token counts onto its own body and writes per-instance JSON logs to logs/.

Installing it

ComfyUI Manager (search "NanoBanana") works, or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/darrell-goh/ComfyUI-NanoBanana_APIv3_node.git
cd ComfyUI-NanoBanana_APIv3_node
pip install -r requirements.txt
cp .env.template .env   # then edit in your API credentials

Then restart ComfyUI. requirements.txt is light - aiohttp, Pillow, python-dotenv, numpy, torch - and since ComfyUI already ships torch and Pillow, you're really adding aiohttp and dotenv. The actual dependency is money and a key: this is a pay-per-image API (roughly $0.04–$0.24 per image depending on resolution), not a free local model. There are no model files to download at all.

Where people get burned

The classic failure is an empty key: with VERTEX_AI_API_KEY unset, every run just returns an error string in the Text Output along with a 1×1 placeholder image, so a gray pixel and an error message means check .env first. Other gotchas: ComfyUI below 0.3.x means the node never appears (V3 schema), the direct-Vertex path silently defaults project/location to "project"/"location" if you leave them unset, and you're charged for every run, failed or not. And set expectations: Nano Banana's safety filtering is aggressive and opaque - superb at editing, style transfer, and text-in-image, but not the tool for uncensored work. This is a small, young pack (v1.0.0), so treat bugs as likely until proven otherwise - but for getting Gemini images into a ComfyUI pipeline, it does the one thing the ecosystem kept needing a browser hack for.

CategoryLLM

Inputs (11)

NameTypeDefaultDescription
system_promptSTRINGYou are a master artist and expert at digital art.
user_message_boxSTRINGCombine all the input images with a background of your envisioning in the year 2050.
modelCOMBOgemini-3-pro-image-preview2 options: gemini-2.5-flash-image, gemini-3-pro-image-preview
image_generationBOOLEANtrue
resolutionCOMBO4K3 options: 1K, 2K, 4K
aspect_ratioCOMBOAuto12 options: None, Auto, 1:1, 4:3, 3:4, 16:9, +6
temperatureFLOAT1.00–1
timeoutINT30030–600
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE

Outputs (4)

NameTypeDescription
Text OutputSTRING
ImageIMAGE
StatsSTRING
ThoughtsSTRING