Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Nano Banana Edit Tuzi API 🐰
ComfyUI Node

πŸ€– Leon Nano Banana Edit Tuzi API 🐰

The Nano Banana 2 edit node that does multi-image edits without touching your GPU

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Nano Banana Edit Tuzi API 🐰
  • input_images_array
  • mask_image
  • image
  • image_url
  • seed
β—„promptmerge two imagesβ–Ί
β—„modelnano-banana-proβ–Ί
β—„seed0β–Ί
β—„api_keyYOUR_API_KEY_HEREβ–Ί
β—„response_formaturlβ–Ί
β—„size1x1β–Ί
β—„quality2kβ–Ί

Of all the nodes in this pack, this is the one people actually find first. Leon Nano Banana Edit Tuzi API 🐰 is Google's Nano Banana 2 line exposed as an image editor: feed it up to four images and a text instruction like "merge two images" or "change the background to a beach", and the model does the edit server-side. No GPU load, no checkpoint download, no local workflow. Your ComfyUI graph becomes a remote-control panel for one of the best closed image models around.

The name is doing a lot of work, so let's unpack it. "Nano Banana" is the community name for Google's Gemini-native image generation - Nano Banana 2 is the fast Gemini 3.1 Flash variant, and Nano Banana Pro is the flagship. "Tuzi" is the API provider here, and it's the one thing that makes this node different from its siblings in the same pack. Almost every other generation node in l3ony2k/comfyui-leon-nodes talks to HyprLab (api.hyprlab.io). This node talks to Tuzi (api.tu-zi.com) instead, and it needs its own API key - the Tuzi key, not a HyprLab one. Miss that and you'll stare at auth errors wondering why the same key works everywhere else.

How it works

Under the hood this is a multipart POST to https://api.tu-zi.com/v1/images/edits. The images in your array become file uploads (or hosted URLs), your mask_image becomes a separate mask.png, and the model edits only the fully transparent regions of the mask. The default prompt - "merge two images" - is a strong hint at the intended use: this node is at its best combining or remixing images, not at one-line inpainting.

The key inputs, in order of how often you'll touch them:

  • prompt - the edit instruction, max 1000 chars. Be specific: "put the first person into the background of the second image".
  • input_images_array - the images to edit. The tooltip says it plainly: REQUIRED for edit. This socket takes the pack's IMAGE_ARRAY type, so you'll usually chain the Image Array Builder node into it. Up to 4 images.
  • mask_image - optional mask; transparent regions get edited.
  • model - nano-banana-pro by default, but nano-banana-2 and the -2k/-vip Pro variants are there.
  • size and quality - WxH ratios like 1x1 or 16x9; quality (1k/2k/4k) only does anything on Banana 2.

Outputs are the pack standard: image (an RGBA tensor you can wire into PreviewImage or SaveImage), image_url (the hosted URL, or a data URI if you set response_format to b64_json), and seed back out for reproducibility.

Installing it

It's part of the comfyui-leon-nodes pack, which installs like any custom node pack:

cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt

Then restart ComfyUI (or search "Leon" in ComfyUI Manager and install from there). Dependencies are light - tenacity, requests, pillow, torch, numpy - and there are zero model files, because nothing local runs.

Where people get burned

The Tuzi-vs-HyprLab key mixup is the classic one. The other classic: forgetting the Image Array Builder. If you plug a plain IMAGE into a node expecting IMAGE_ARRAY, ComfyUI won't even let the wire connect - so the habit is LoadImage β†’ Image Array Builder β†’ this node. And remember the retry behavior shared across the pack: failures retry up to 5 times with exponential backoff, so a bad key doesn't fail fast, it grinds. Also note quality only applies to nano-banana-2; on the Pro variants it's silently ignored, which trips people up when they set 4k and get 1k-looking output.

If your workflow is "remix these two reference shots", this is the node. For plain text-to-image, the non-edit sibling - Leon Nano Banana Tuzi API - is the one you want instead.

CategoryLeon_API

Inputs (9)

NameTypeDefaultDescription
promptSTRINGmerge two imagesText description of the desired image. Maximum length 1000 characters.
modelCOMBOnano-banana-proNano Banana 2 model variants
seedINT00–18446744073709550000Random seed for reproducible results
api_keySTRINGYOUR_API_KEY_HEREYour Tuzi API key
response_formatCOMBOurlFormat for returning the generated image. Must be either url or b64_json.
input_images_arrayoptIMAGE_ARRAYArray of input images to edit. Connect Image Array Builder node output here. REQUIRED for edit.
mask_imageoptIMAGEAdditional image where fully transparent regions (e.g., areas with alpha zero) will be edited
sizeoptCOMBO1x1Size of generated image (format: WxH ratio)
qualityoptCOMBO2kImage generation quality (only effective for Banana 2)

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
image_urlSTRINGβ€”
seedINTβ€”