Nodes/ComfyUI-CustomNodePacks/Nano Banana · Gemini Image (C2C)
ComfyUI Node

Nano Banana · Gemini Image (C2C)

Nano Banana in your graph, no local GPU required

By Code2Collapse·Created 6 months ago·Updated a day ago· 52
Nano Banana · Gemini Image (C2C)
  • image_1
  • image_2
  • image_3
  • image_4
  • images
  • text_response
  • info
prompt
modelgemini-3-pro-image-preview
modetext_to_image
prompt_styleraw
aspect_ratioauto
resolutionauto
enhance_promptfalse
response_modalitiesIMAGE+TEXT
temperature1.00
batch_count1
seed0
api_key
system_instruction

The name is a lie in the best way. "Nano Banana" sounds like a garnish, but it's Google's Gemini image model - the closed one that saturates the Reddit corpus at thousands of threads and that you literally cannot download. No open weights exist for it. The only door is the API, and this node is that door, parked in your ComfyUI graph like it's just another sampler. If you have a Google AI Studio key, you get Gemini 3 Pro Image (the "Nano Banana Pro" tier, up to 4K with strong text rendering) and Gemini 2.5 Flash Image (the fast GA model) as nodes next to your local KSampler.

It's an API wrapper, so it needs a key

It's an HTTP client dressed up as a generator, which is the whole architecture story in one line: prompt and up to four reference IMAGE inputs go out to generativelanguage.googleapis.com, the bytes come back as a ComfyUI IMAGE batch, and downstream you can do anything you'd do to a local render. One thing to internalize from the start - it needs a Google AI Studio key, in the api_key widget or the GEMINI_API_KEY / GOOGLE_API_KEY environment variable. Empty key, no image. That's also your security moment: this is an API-wrapper node carrying a credential, and the KB's standing advice applies - only run packs you trust with a key in them, because a malicious phone-home is indistinguishable from a legit one here.

The knobs you'll actually set

The parts you'll actually set: mode is the big one. text_to_image for generation, edit_image (needs at least one reference image), style_transfer (needs two, first is content and last is style), plus a compose_images multi-reference mode. prompt_style wraps your prompt in a template - raw passes it through, cinematic appends a full camera/lighting brief, structured_json turns it into a JSON brief the model follows reliably, and character_consistency / product_shot are exactly what they sound like. That's the author's own framing and it's a genuinely useful layer; the templates are the sort of thing you'd hand-write once and never improve on.

Picking your model

Model pick: gemini-3-pro-image-preview is the flagship with 1K/2K/4K resolution and up to 14 reference images (the node caps your four inputs at the API's limit), while gemini-2.5-flash-image is the cheap-and-fast GA model - and note resolution is Pro-only, flash ignores it. enhance_prompt runs a quick Gemini text pass (Higgsfield-style) to expand your prompt into a richer brief before generation; handy, but it changes what you typed, so keep it off if you're iterating on exact wording. There's no real seed - seed is ComfyUI caching, same value reuses the cached result.

Batching and install

Batches: batch_count runs sequential API calls and stacks them, which is slower than you'd hope but keeps one node tidy. Outputs are images, plus text_response (the model's commentary, if you keep response_modalities on IMAGE+TEXT) and an info string.

Install is the normal pack route - clone Code2Collapse/ComfyUI-CustomNodePacks into custom_nodes or ComfyUI Manager search "CustomNodePacks". Zero local models, no GPU load. The recurring gotchas in the community: wrong key scoping (the API key, not a project one), reference images over 2048px getting downscaled before upload (fine, but check your edit fidelity on big sources), and forgetting that rate limits and billing are per-call - a 4K batch_count of 8 is eight API calls. The free/cheap path is OpenRouter's google/gemini-2.5-flash-image-preview:free if you want to experiment without a billing account, though this node points at Google directly.

CategoryC2C/AI Image

Inputs (17)

NameTypeDefaultDescription
promptSTRINGWhat to generate / how to edit. With prompt_style=structured_json you may paste a full JSON brief.
modelCOMBOgemini-3-pro-image-previewgemini-3-pro-image-preview = Nano Banana Pro (1K/2K/4K, best text, 14 refs). gemini-2.5-flash-image = fast GA model.
modeCOMBOtext_to_imageedit_image needs ≥1 reference image; style_transfer needs ≥2 (first = content, last = style).
prompt_styleCOMBOrawWraps your prompt in a proven template: cinematic photo, structured JSON brief, character-consistency lock, or commercial product shot.
aspect_ratioCOMBOauto11 options: auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5
resolutionCOMBOauto1K/2K/4K are Nano Banana **Pro** only; flash models ignore this.
enhance_promptBOOLEANfalseHiggsfield-style enhancer: a fast Gemini text pass expands your prompt into a rich, detailed image brief before generation.
response_modalitiesCOMBOIMAGE+TEXTIMAGE = picture only; IMAGE+TEXT also returns the model's commentary on the text_response output.
temperatureFLOAT1.000–2
batch_countINT11–4Sequential API calls; results are stacked into one batch.
seedINT00–2147483647Gemini has no true seed — this controls ComfyUI caching: same seed reuses the cached result, new seed regenerates.
api_keyoptSTRINGGoogle AI Studio key. Empty = use GEMINI_API_KEY / GOOGLE_API_KEY environment variable.
system_instructionoptSTRINGOptional system-level art direction applied to every generation (brand style, banned elements, palette rules).
image_1optIMAGEReference image(s). Batches flatten in order.
image_2optIMAGE
image_3optIMAGE
image_4optIMAGEFor style_transfer the LAST image is the style.

Outputs (3)

NameTypeDescription
imagesIMAGE
text_responseSTRING
infoSTRING