Nodes/api_yi_nano_banana_node/APIYI Multi Image Edit (Up to 5 Images)
ComfyUI Node

APIYI Multi Image Edit (Up to 5 Images)

Fuse up to 5 images with Nano Banana — Google's reference-image magic, minus the Google account

By JerrIsTheBesta·Created 4 months ago·Updated 4 months ago· 1
APIYI Multi Image Edit (Up to 5 Images)
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image
  • filename
  • used_image_count
api_keysk-your-api-key
model_name
prompt将多张图片融合为一张专业、自然、细节清晰的画面。
aspect_ratio
resolution

This is the sibling of the pack's text-to-image node, and it exists for the job the text node can't do: edit or fuse images you already have. Wire in up to five IMAGE inputs, type something like "merge these into one professional team photo," and a Gemini image model (the "Nano Banana" family) does the compositing on Google's servers. It's the reference-image ability of Nano Banana Pro - which natively handles up to 14 reference images - exposed through ComfyUI. Local checkpoints can't touch this kind of multi-image semantic merge, which is exactly why you'd pay an API for it.

How it works

The mechanics are simple once you've seen the text node. For every connected input, the node grabs the first frame of the IMAGE tensor, converts it to a base64-encoded PNG, and drops it into the API request as inline_data next to your prompt. The response - a generated PNG - is decoded back into a ComfyUI IMAGE tensor. Two gotchas baked into that round-trip: each image goes through PNG and is forced to RGB, so alpha channels are silently dropped; and if you feed it a batched image, only the first frame is sent. The node also reports how many images actually made it into the request, which is a genuinely useful tripwire for silently broken upstream connections.

Inputs and outputs

Same core set as the text node - api_key, model_name, prompt, aspect_ratio, resolution - plus the image slots. image_1 is required; image_2 through image_5 are optional, and you can leave any of them unconnected. The README's guidance is sound: only connect what you actually want sent.

Outputs:

  • image - the composited result as a ComfyUI IMAGE tensor.
  • filename - an identifier string like apiyi_20260820_123456.png; not a real file.
  • used_image_count - an INT telling you how many input images actually went into the request. If it's lower than you expected, something upstream is silently not connected.

Install

Identical to its sibling - they ship in the same pack, so one install gets both:

cd ComfyUI/custom_nodes
git clone https://github.com/JerrIsTheBesta/api_yi_nano_banana_node

Restart ComfyUI, and if the console complains, pip install requests pillow numpy (torch comes with ComfyUI). No model files to download - this node runs on an API key, not a GPU.

Where people get burned

The blocking behavior is the same as the text node and worse-feeling, because a 4K multi-image request can pin your queue for a full 360 seconds. The queue looks hung; it isn't. Give it the timeout and let it cook.

The other thing to keep in mind: this node feeds real photos to Google's most aggressively-filtered image model. The KB notes the January 2026 policy tightening on IMAGE_SAFETY and celebrity/IP generation. If your source images contain recognizable people, expect refusals or rewrites you didn't ask for. And don't use this node as a text-to-image fallback - image_1 is required, so an empty graph errors out. No input image? Use the text node; it's cleaner and the README says so.

Troubleshooting

  • "至少需要提供 1 张输入图片" - image_1 isn't connected.
  • "API Key 不能为空" - empty key; fill it in.
  • Non-200 status codes - key validity, account permission, model name, network. The README's checklist, and it's the right one.

Money and hygiene advice apply here too: this is per-image paid, so run your edits at 2K first, and use a dedicated API key with a spend cap - never your master key. For one-shot multi-image editing that local models can't match, this is a solid, if paid, answer.

CategoryAPIYI/Image

Inputs (10)

NameTypeDefaultDescription
api_keySTRINGsk-your-api-key
model_nameCOMBO2 options: gemini-3-pro-image-preview, gemini-3.1-flash-image-preview
promptSTRING将多张图片融合为一张专业、自然、细节清晰的画面。
aspect_ratioCOMBO10 options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, +4
resolutionCOMBO2 options: 2K, 4K
image_1IMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE

Outputs (3)

NameTypeDescription
imageIMAGE
filenameSTRING
used_image_countINT