π€ Leon Nano Banana Tuzi API π°
Nano Banana 2 text-to-image from inside ComfyUI β via the Tuzi API
- input_images_array
- image
- image_url
- seed
Leon Nano Banana Tuzi API π° is the generation-side sibling of the pack's edit node: same Nano Banana 2 model family, same Tuzi backend, but this one makes images from a prompt instead of editing ones you hand it. Drop in a prompt, pick a model and a size, and a tensor comes back the other end. It's a clean way to get Google-grade closed-model generation into a ComfyUI graph without renting a GPU or running a 12B transformer locally.
"Nano Banana" is Google's Gemini-native image generation - the Pro line is the flagship (native 4K output, strong text rendering), and nano-banana-2 is the speed-and-quality hybrid. The Tuzi part is the provider: api.tu-zi.com. That's worth repeating because it's the #1 gotcha of this node: it uses a Tuzi API key, not the HyprLab key the rest of the pack defaults to. The api_key input literally defaults to YOUR_API_KEY_HERE and the tooltip says "Your Tuzi API key". Sign up at the provider, paste the key, done.
How it works
The node builds a JSON payload - model, prompt, response_format, optional size and quality - and POSTs it to https://api.tu-zi.com/v1/images/generations with a Bearer token. It reuses the pack's shared HyprLab-style base class, which means the same 5-attempt exponential-backoff retry and the same post-processing: the returned image gets converted to an RGBA tensor, so it plugs straight into PreviewImage, SaveImage, or anything else downstream that expects an IMAGE.
Inputs worth knowing:
prompt- max 1000 characters. Default is "a cat.", which is the pack's way of telling you to write something real.model-nano-banana-pro,nano-banana-pro-2k,nano-banana-pro-vip, ornano-banana-2.size- WxH ratio choices from1x1up to21x9.quality-1k/2k/4k, but the tooltip is explicit: only effective for Banana 2. On Pro models it's ignored.input_images_array- optional, up to 4 images, which turns this from text-to-image into image-to-image. Wire it through the pack's Image Array Builder node; that's the only source of theIMAGE_ARRAYtype.
Outputs are the pack standard triple: image (RGBA tensor), image_url (hosted URL, or a data URI if you chose b64_json for response_format), and seed.
Installing it
Same pack install as always:
cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt
Restart ComfyUI, or use ComfyUI Manager and search for the Leon pack. Dependencies are just tenacity, requests, pillow, torch and numpy - no models to download, because the heavy lifting happens on Tuzi's servers.
Where people get burned
Beyond the key mixup, the thing that bites people is expecting seed to be a hard guarantee of reproducibility. It works for these Nano Banana models - the seed is sent through and returned - but the retry behavior means a transient failure re-runs with the same seed, which is fine. More practically: don't forget that quality is a no-op on Pro, and remember the array-based image input means the Image Array Builder is part of the standard wiring. If you want to edit images rather than generate them, grab the edit variant of this node - it's the sibling in the same pack and the one with the multi-image remix workflow.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | a cat. | Text description of the desired image. Maximum length 1000 characters. |
| model | COMBO | nano-banana-pro | Nano Banana 2 model variants |
| seed | INT | 00β18446744073709550000 | Random seed for reproducible results |
| api_key | STRING | YOUR_API_KEY_HERE | Your Tuzi API key |
| response_format | COMBO | url | Format for returning the generated image. Must be either url or b64_json. |
| input_images_arrayopt | IMAGE_ARRAY | Array of input images (up to 4). Connect Image Array Builder node output here. | |
| sizeopt | COMBO | 1x1 | Size of generated image (format: WxH ratio) |
| qualityopt | COMBO | 2k | Image generation quality (only effective for Banana 2) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| image_url | STRING | β |
| seed | INT | β |