đ NB2 Multi-Image Blend
Nano Banana 2 blending in ComfyUI
- image_1
- image_2
- image_3
- image_4
- image
Feed this node up to four images and one sentence, and it fuses them into a single scene. That's the entire job, and it's a surprisingly useful one. It's the "character sheet" node: you've got a hero render from three angles plus a mood board, and you want one cohesive image that respects all of them. Assembling that locally means img2img ping-pong, LoRA roulette, or a lot of inpainting prayer. With Nano Banana 2 (Gemini 3.1 Flash Image) via Vertex AI, it's one prompt away.
The 4-image cap is worth putting in perspective. Google's own Nano Banana Pro advertises up to 14 reference images - but this pack exposes exactly four inputs no matter which model you pick, so if you need more references you're outside this node's envelope anyway. For most concept work, four is plenty.
How it works
Mechanically it's the pack's edit node with extra limbs. Every connected IMAGE is converted to a base64-encoded PNG and sent to the Vertex AI generateContent endpoint as an inlineData part, with your prompt text appended as the final part. The model reads all of them and returns one image, which the node decodes back into a ComfyUI tensor. The code filters out unconnected inputs, so you can blend two images or three without leaving gaps - only image_1 is required.
The inputs that matter
- image_1 through image_4 - your references. Any node outputting an
IMAGEworks: Load Image, or the output of another generation node. Hook them all up and let the model sort out the fusion. - prompt (multiline) - the glue. The default, "Blend these references into a single cohesive scene," is fine, but you'll get much better results if you name what you want from each reference: "keep the character's face from the first image and the lighting from the third."
- project_id, location, model, aspect_ratio - the pack's standard cloud config, identical to the sibling nodes.
Optional: access_token and seed (-1 = random). And here's a real difference from the other two nodes in this pack: there's no negative prompt and no search grounding on the blend node. Don't go hunting for them; they're just not there.
Output is a single image tensor - wire it into Save Image, or chain it into any node that takes an IMAGE.
Installing and the shared pack setup
Same story as the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/tonykatarapro-web/ComfyUI_NanaBanana2
Restart ComfyUI, or install "ComfyUI_NanaBanana2" through ComfyUI Manager. No pip requirements, no model downloads - the pack's only dependencies are the numpy/PIL/torch ComfyUI already ships.
Before your first blend, get the auth in place. You need a Google Cloud project with Vertex AI enabled, and a Bearer token provided one of three ways: pasted into access_token, set as the GOOGLE_CLOUD_ACCESS_TOKEN env var, or auto-fetched if gcloud is installed. The token expires after an hour, which is the cause of 90% of the "it worked yesterday" reports:
export GOOGLE_CLOUD_ACCESS_TOKEN=$(gcloud auth print-access-token)
Also set location to global - the README flags it as required for this model, and the default us-central1 can throw model-not-found.
Realistic expectations
Two honest caveats. First, Gemini blends by description, not by pixel position - the model has no idea where your reference subjects sat in their original frames, so it composes a new scene and keeps their essence. If one reference keeps getting ignored, it's not a wiring bug; name what you want from it in the prompt and it'll show up. Second, you're paying per image on a metered API, every output carries Google's invisible SynthID watermark, and the content filters tightened in January 2026 - the pack doesn't expose Vertex's safetySettings, so you get the defaults. As a concepting and character-consistency tool in a mixed local/cloud workflow, it's excellent. As a bulk generator, your local stack will be cheaper and more honest about its constraints.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image_1 | IMAGE | â | |
| prompt | STRING | Blend these references into a single cohesive scene | â |
| project_id | STRING | â | |
| location | COMBO | us-central1 | 8 options: global, us-central1, us-east1, us-west1, europe-west1, europe-west4, +2 |
| model | COMBO | gemini-3.1-flash-image-preview | 2 options: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview |
| aspect_ratio | COMBO | 1:1 | 10 options: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, +4 |
| image_2opt | IMAGE | â | |
| image_3opt | IMAGE | â | |
| image_4opt | IMAGE | â | |
| access_tokenopt | STRING | â | |
| seedopt | INT | -1-1â2147483647 | â |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | â |