Nodes/ComfyUI-BananaForge/πŸ–ΌοΈ BananaForge Image β†’ Image
ComfyUI Node

πŸ–ΌοΈ BananaForge Image β†’ Image

Six reference images, one Gemini edit β€” the i2i sibling

By Rinne414Β·Created 7 months agoΒ·Updated 2 months agoΒ· 2
πŸ–ΌοΈ BananaForge Image β†’ Image
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • IMAGE
β—„api_urlhttps://generativelanguage.googleapis.com/v1betaβ–Ί
β—„api_keyβ–Ί
β—„use_env_filenoβ–Ί
β—„model_namegemini-3-pro-image-previewβ–Ί
β—„promptEdit this imageβ–Ί
β—„match_input_aspectyesβ–Ί
β—„aspect_ratio1:1β–Ί
β—„image_sizedefaultβ–Ί
β—„wait_seconds0.0β–Ί

Same pack, different job. Where the Text→Image node is a plain Gemini prompt-to-image wrapper, this one feeds up to six images plus a text instruction into Google's model and gets back one edited image. Gemini image models are natively multimodal - they actually look at the pictures you send - which makes this a different beast from a local img2img node. No ControlNet, no strength slider, no denoise. You describe the change and the model just... does it.

That's the appeal: style transfer, "make this character hold a sword," fusing two reference photos into one composition, or keeping a face consistent across an edit. It's the closest thing this pack has to a "chat with your image" node, and for the kind of prompt-driven edits Gemini is good at, it beats wrestling with local inpainting masks.

How it works

Under the hood it's the same generateContent call as the text node, but the payload's contents list gets the instruction text followed by every input image encoded as base64 PNG (inlineData). The model sees them as if you'd pasted them into a chat. The match_input_aspect input, defaulting to yes, reads the pixel dimensions of image_1 and snaps the output to the closest standard ratio (1:1, 16:9, 9:16, 4:3, 3:4), then passes that to the API. Turn it off and the aspect_ratio field is used instead.

Like the other nodes, it appends an [Image settings: ...] hint to your prompt, retries three times on transient network errors, and decodes the base64 response into a normal ComfyUI IMAGE tensor.

The inputs that matter

  • image_1 - the primary image, the only required one. Everything else is optional.
  • image_2 … image_6 - extra reference images, sent alongside. This is how you do multi-reference work: several shots of the same character, a style sample plus a subject, that kind of thing.
  • prompt - your instruction. "Edit this image" (the default) is a waste of an API call; say what you actually want changed.
  • match_input_aspect - yes/no. Defaults to auto-matching the input's ratio.
  • image_size - default, 2K, 4K. Same caveat as the text node: only honored when the model name contains "pro."
  • api_key, model_name, wait_seconds - shared with the rest of the pack.

One output: IMAGE. Save it, upscale it, whatever - it's a normal tensor.

A real limitation

The README's model table brags that gemini-3-pro-image-preview (Nano Banana Pro) accepts up to 14 reference images - and Pro genuinely supports that many. But this node only exposes six inputs. So the flagship multi-reference use case is capped here at 6, which is fine for most character-consistency work but is a ceiling you'll hit if you were planning to dump a full reference sheet at it. If you need more than six, you're outside what this pack can do today.

Installing it

Identical to the other BananaForge nodes - it ships in the same pack:

cd ComfyUI/custom_nodes
git clone https://github.com/peter119lee/ComfyUI-BananaForge

Restart, look under Banana Forge, paste a key from Google AI Studio, done. No dependencies to pip, no models to download, no GPU needed - the requirements.txt is essentially empty and the heavy lifting is in Google's cloud. The repo also lives at Rinne414/ComfyUI-BananaForge after the author's GitHub account rename; both URLs point at the same code.

Where people get burned

  • Vague prompts. This model follows instructions, so "make it look cinematic" gives you a coin flip. "Add golden hour lighting and a shallow depth of field" gives you something usable.
  • Content blocked. Gemini image generation is aggressively filtered - more so since early 2026. Editing real people or recognizable IP will trip safety filters, and the node surfaces the block reason when it does. Don't fight it; reword.
  • Aspect drift. If match_input_aspect snaps your unusual crop (say 2.35:1) to the nearest of the five standards, you'll get a 16:9-ish result, not your exact frame. Set it to no if that matters and accept the standard ratios.
  • Rate limits. Each run is a separate paid/free-tier call; if you're looping this in a batch, add wait_seconds and mind the free tier's throttling.
CategoryBanana Forge

Inputs (15)

NameTypeDefaultDescription
api_urlSTRINGhttps://generativelanguage.googleapis.com/v1betaAPI base URL
api_keySTRINGAPI key (leave empty to use .env file)
use_env_fileCOMBOnoLoad API key from .env file
model_nameSTRINGgemini-3-pro-image-previewModel name
promptSTRINGEdit this imageInstruction for image editing
image_1IMAGEPrimary input image (required)
match_input_aspectCOMBOyesMatch output aspect ratio to input image
aspect_ratioCOMBO1:1Output aspect ratio (when not matching input)
image_sizeCOMBOdefaultOutput resolution
wait_secondsFLOAT0.00–60Wait time before API call (to avoid rate limits)
image_2optIMAGEOptional 2nd reference image
image_3optIMAGEOptional 3rd reference image
image_4optIMAGEOptional 4th reference image
image_5optIMAGEOptional 5th reference image
image_6optIMAGEOptional 6th reference image

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”