Nodes/OnlyGemini/OG NanoBanana Generate
ComfyUI Node

OG NanoBanana Generate

Nano Banana With Your Own Google Key, No Comfy Account Required

By choquevolqueta·Created 10 days ago·Updated 6 days ago· 0
OG NanoBanana Generate
  • image
  • ref_image_1
  • ref_image_2
  • ref_image_3
  • ref_image_4
  • ref_image_5
  • image
◄prompt►
◄api_key►
◄modelgemini-3.1-flash-image►
◄aspect_ratio1:1►
◄resolution1K►
◄temperature0.50►
◄top_p0.85►
◄seed69►
◄system_instruction►
◄google_searchfalse►

Nano Banana produces some of the best images available anywhere, and you cannot download it. There's no checkpoint, no GGUF, no "when Comfy?" - it's Gemini's image model, reachable only over the API. So the question was never whether you'd call it, only which node calls it for you.

ComfyUI's official Partner Nodes are the vetted answer, but they run on prepaid credits tied to a Comfy account. NanoBananaGen (display name "OG NanoBanana Generate") takes the other road: it's a thin google-genai wrapper that bills your own Google AI Studio key directly and hands back a plain IMAGE tensor. Same model, one less middleman - and the output drops straight into a local workflow.

That last part is the actual argument. The standard hybrid pipeline now is a closed model for the frame, an open model for the motion - Nano Banana makes a still, Wan animates it. This node is the "makes a still" half, sitting on your canvas instead of in a browser tab.

The trade is plain: every call is metered, your prompt and references leave the machine, and the safety filter is Google's, unremovable. That's the price of a model you were never allowed to download.

What it actually does under the hood

It assembles one request: a text part for your prompt, then your input image if you wired one, then up to five reference images (ref_image_1 … ref_image_5), all in a single flat list, and calls generate_content asking for ["TEXT", "IMAGE"] back. The image bytes in the response become a float32 tensor at 0–1, and if the model returns more than one image they get concatenated into a batch - so a downstream Save Image may well show you two or three results, not one.

Note what's missing: no role labels. It's prompt, image, refs, in that order, and Gemini infers what's what. Need it to understand "this is the background, these are the subjects"? That's GeminiOrchestrate.

The inputs you'll actually touch

prompt does double duty: describe a picture and you get text-to-image; describe a change and connect image, and it edits. The author's own tip is to describe only what changes, not the whole frame.

model is a three-way choice: gemini-3.1-flash-image (the default, fast), gemini-3-pro-image (the quality one), gemini-3.1-flash-lite-image (cheapest).

Two traps live in the fields next to it:

  • resolution (1K/2K/4K) only does anything on a gemini-3-pro model. The node conditionally attaches it; on flash and lite it's silently dropped. If you set 4K and get a 1K-looking image, nothing's broken - you're on the wrong model.
  • google_search only gets wired up when the model isn't a 2.5 build and isn't lite. On flash-lite, toggling it is a no-op.

seed (default 69) goes to the API, but don't expect local-sampler behaviour - the same seed won't give you a bit-identical reroll. aspect_ratio has ten options including 21:9, which the pack's other image node doesn't offer. system_instruction is the one to actually use: park your house style there ("photographic, 35mm, no text overlays") and keep the prompt about content.

Output is one image socket. Wire it to Save Image, to Veo's image input as a first frame, or into OG Omni Flash's reference slots as an aesthetic ref.

Install

Via ComfyUI Manager: search OnlyGemini (the pack title) → Install Custom Nodes → restart. Manually:

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

That requirements file installs the whole pack's dependencies - google-genai, python-dotenv, av, simple-lama-inpainting, opencv-python - even though this node only needs the first two. The rest are for the video and LaMa nodes.

Then give it a key from Google AI Studio, in order of preference:

export GEMINI_API_KEY="your-key"

or drop a GEMINI_API_KEY=... line in a .env file inside the pack folder (git-ignored). The api_key widget accepts either a literal key or the name of an environment variable, and it strips whitespace before resolving. One warning: that widget is a normal node field, so a key pasted into it gets saved into your workflow JSON. Export the env var instead and leave the field empty if you ever share a workflow or a screenshot of it.

Where people get burned

API key required. Nothing resolved: no env var, no .env, empty field. Set GEMINI_API_KEY and restart ComfyUI so the process sees it.

Gemini returned no image content. finish_reason=... safety=... - the filter, not your graph. Google's image line is aggressively moderated, and a January 2026 update tightened rules on famous IP and celebrities. The error names the category that tripped. Rephrase, or go local.

Timeouts, [Errno 11001] getaddrinfo failed. Transient DNS on the way to Google. Retry.

One last thing. The pack is roughly a thousand lines of MIT Python and one author, which is short enough to read before you run it - worth doing for any pack that holds a credential and phones home by design, in a category that has shipped malware once. nodes/image_gen.py is 125 lines and does exactly what it says.

Categoryimage/generation

Inputs (16)

NameTypeDefaultDescription
promptSTRING—
api_keySTRINGGemini API key or env variable name
modelCOMBOgemini-3.1-flash-image3 options: gemini-3.1-flash-image, gemini-3-pro-image, gemini-3.1-flash-lite-image
aspect_ratioCOMBO1:110 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4
resolutionCOMBO1K3 options: 1K, 2K, 4K
temperatureFLOAT0.500–1—
top_pFLOAT0.850–1—
seedINT69-1–2147483646—
system_instructionoptSTRING—
google_searchoptBOOLEANfalse—
imageoptIMAGEOptional reference image for editing. Leave empty for pure generation.
ref_image_1optIMAGE—
ref_image_2optIMAGE—
ref_image_3optIMAGE—
ref_image_4optIMAGE—
ref_image_5optIMAGE—

Outputs (1)

NameTypeDescription
imageIMAGE—