Overview
ComfyUI-Nano-Banana-apiyi is a community-contributed collection of ComfyUI custom nodes, purpose-built for APIYI users. It lets you call Google’s most powerful image generation models — Nano Banana Pro and Nano Banana 2 — directly within ComfyUI workflows, without needing a Google Cloud account. Just an APIYI API key is all you need to start creating.Project Info
- 🔗 Source Code:
github.com/anirudhatalmale6-alt/ComfyUI-Nano-Banana-apiyi - 📜 License: MIT
- 👤 Author: anirudhatalmale6-alt
- ⭐ Community contributed, adapted for APIYI
Why This Node
Zero Barrier Entry
No Google Cloud account needed — use your APIYI key to access Nano Banana Pro and Nano Banana 2 models
Multi-Modal Generation
Text-to-image, image-to-image, and multi-image fusion (up to 14 reference images) for all creative needs
Multi-Turn Chat Editing
Unique conversational image generation with context memory for iterative refinement
Ultra-High Resolution
Supports 512px, 1K, 2K, 4K output with 14 aspect ratios, covering posters, wallpapers, social media, and more
Supported APIYI Models
Four Core Nodes
This plugin provides 4 functional nodes covering different use cases:| Node Name | Model | Core Capability | Best For |
|---|---|---|---|
| Nano Banana AIO | Pro | Text-to-image + image-to-image (1-6 refs) + search grounding | High-quality creation |
| Nano Banana Multi-Turn Chat | Pro | Conversational image editing | Iterative refinement |
| Nano Banana 2 AIO | Flash | Text-to-image + image-to-image (up to 14 refs) + image search | Fast batch generation |
| Nano Banana 2 Multi-Turn Chat | Flash | Conversational editing + extreme aspect ratios | Quick iteration |
Getting Started: Installation & Setup
Step 1: Check Prerequisites
Make sure you have the following installed:
- ComfyUI (latest version) — if not installed, see:
github.com/comfyanonymous/ComfyUI - Python 3.12+
- Git
Step 2: Download Node Code
Open your terminal, navigate to ComfyUI’s custom nodes directory, and clone the repository:
Step 3: Install Dependencies
Enter the plugin directory and install required dependencies:For Nano Banana 2 node support, also install:
Step 4: Get Your APIYI Key
- Visit APIYI Console to register/login
- Go to the Token section
- Generate a new API key
- Copy the key (starts with
sk-)
New users get free trial credits, enough to experience Nano Banana image generation.
Step 5: Configure Environment Variables
In the plugin directory, copy the template file and fill in your credentials:Edit the
.env file with your APIYI key and Base URL:Hands-On Tutorial: From Text to Image
Scenario 1: Text-to-Image (Basic)
The simplest usage — input a text description, generate an image.Add Node
Right-click on the ComfyUI canvas, search for and add the Nano Banana AIO node (or Nano Banana 2 AIO).
Configure Parameters
- image_count: Number of images to generate (1-10)
- aspect_ratio: Choose ratio, e.g.,
16:9(landscape wallpaper) or9:16(phone wallpaper) - image_size: Resolution — recommend
2Kor4K - temperature: Creativity level, 0.0 most conservative, 2.0 most creative
Scenario 2: Image Editing & Fusion
Use reference images to guide generation — great for style transfer, element fusion, and more.- Connect your reference images to the
image_1throughimage_6inputs of the Nano Banana AIO node - Describe the desired effect in
prompt, e.g., “Convert this photo to watercolor painting style” - The model combines reference images and text description to generate new images
Scenario 3: Multi-Turn Conversational Editing
The most unique feature — refine images step by step, like chatting.- Add the Nano Banana Multi-Turn Chat node
- Round 1: Enter initial description, generate base image
- Round 2: Enter modification, e.g., “Change the background to a beach”
- Round 3: Continue refining, e.g., “Add sunset lighting”
- Each round builds on the conversation memory
reset_chat to clear conversation history and start fresh.
Node Parameters Reference
Nano Banana AIO / Nano Banana 2 AIO
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Image description text |
image_count | integer | No | Number of images (1-10), default 1 |
aspect_ratio | enum | No | Aspect ratio (11 options / NB2 has 14) |
image_size | enum | No | Resolution: 512px (NB2 only), 1K, 2K, 4K |
temperature | float | No | Creativity 0.0-2.0 |
use_search | boolean | No | Enable Google search grounding |
image_1 ~ image_6/14 | image | No | Reference image inputs |
Supported Aspect Ratios
| Standard (shared by both nodes) | Nano Banana 2 Exclusive |
|---|---|
| 1:1, 2:3, 3:2, 3:4, 4:3 | 1:4 (ultra-tall vertical) |
| 4:5, 5:4, 9:16, 16:9 | 4:1 (ultra-wide horizontal) |
| 21:9, Auto (AI auto-select) | 1:8, 8:1 (extreme ratios) |
FAQ
Can't find the nodes after installation?
Can't find the nodes after installation?
Check the following:
- Plugin folder is in the
ComfyUI/custom_nodes/directory - You ran
pip3 install -r requirements.txt - For Nano Banana 2 nodes, also run
pip install google-genai --upgrade - You restarted ComfyUI (not just refreshed the browser — restart the backend)
API Key invalid error?
API Key invalid error?
Please verify:
GOOGLE_API_KEYin.envfile is your APIYI key (starts withsk-)CUSTOM_BASE_URLis set tohttps://api.apiyi.com- Your APIYI account has sufficient balance (check in the console)
Slow generation or timeout?
Slow generation or timeout?
- 4K resolution takes longer — try 1K first for testing
- Multiple images (image_count greater than 1) increases processing time
- If timeouts are frequent, try lower resolution or fewer images
Nano Banana Pro vs Nano Banana 2 — which to choose?
Nano Banana Pro vs Nano Banana 2 — which to choose?
- Nano Banana Pro (
gemini-3-pro-image-preview): Finer quality, ideal for premium creations - Nano Banana 2 (
gemini-3.1-flash-image-preview): Faster, cheaper (from $0.018/image), more reference images and extreme ratios - For daily creation, Nano Banana 2 is recommended; for ultimate quality, choose Pro
How to get an APIYI API key?
How to get an APIYI API key?
Visit APIYI Console, register an account and generate a new key in the Token section. New users receive free trial credits.
Image generation failed due to content safety?
Image generation failed due to content safety?
Nano Banana models have built-in content safety checks. Some descriptions may trigger restrictions. Suggestions:
- Adjust your prompt to avoid sensitive content
- See Nano Banana Image Failure Troubleshooting for more help