🎨 Nano Banana (Gemini 2)
Nano Banana inside ComfyUI
- image
- image
- prompt
This is Google's Nano Banana - Gemini 2.5 Flash Image - wired into a ComfyUI node so you can call it mid-workflow instead of tabbing over to a browser. It's an API node, not a local model. Nothing gets downloaded, nothing runs on your GPU, and it will not work without a Google API key. If you were hoping for weights on disk, this is the other thing: your prompt (and an optional reference image) goes to Google, an image comes back.
Worth being clear about what Nano Banana is, because the branding is a mess. The name started as an anonymous codename on a HuggingFace leaderboard, Google execs leaned into the banana emoji bit, and it stuck. Under the hood it's Gemini-native image generation. This node is the plain Flash tier - fast, cheap, good at prompt-driven edits when you feed it a reference image. If you want the 4K, up-to-14-reference-images flagship, that's the separate Nano Banana Pro node in this same pack.
How it works
You give it text, optionally an image, and it sends a request to the Gemini API. The SDVN twist is the conveniences baked around that call. The translate field defaults to english, which means it auto-translates your prompt before sending - handy if you write in another language, and the reason a Vietnamese-community pack ships it on by default. There's Google Translate and dynamic-prompt support on the text fields across this whole pack, so {red|blue|green} car style wildcards work here too.
The inputs and outputs that matter
Gemini_API- your key. Paste it here, or leave it blank and set it once in the pack'sAPI_key.json(more on that below).prompt(andsub_prompt) - what you want.promptis the main instruction;sub_promptis a second text field to stack extra detail without cramming one box.image(optional) - a reference. This is where Nano Banana earns its keep: hand it a photo plus "put this person on a beach" and it edits rather than generates from scratch.max_size_input- caps how large the reference image is before it's sent (0 means don't resize). Bigger reference = more tokens = more cost, so this is a real lever, not decoration.
Two outputs: image (wire into a Save Image or downstream node) and prompt (the final text actually sent, after translation - useful for logging what got generated).
How to install it
Two ways. In ComfyUI Manager, open the Custom Nodes Manager, search SDVN_Comfy_node, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
then from your ComfyUI root install the deps - pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt - and restart.
For the key: grab one at aistudio.google.com/app/apikey. You can paste it into the Gemini_API field, but the cleaner move is to rename API_key.json.example to API_key.json in the pack folder and drop it there once, so it's not sitting in your saved workflow JSON.
Common issues & troubleshooting
Blank output or an API error. Almost always the key: missing, wrong, or a Google account with no billing/quota. Test the same key in Google AI Studio first to isolate it.
"But it's censored." Yes. Gemini's image safety filtering is aggressive and got stricter in a January 2026 policy update, with hard limits on celebrity and famous-IP generation. If a prompt silently comes back empty or refused, that's the filter, not the node. This is server-side - you can't tune it out.
Every image carries a watermark. Google embeds an invisible SynthID watermark in everything Gemini generates. It won't show, but it's there, which matters if you care about provenance.
"Requirement already satisfied" spam on startup. Harmless - that's ComfyUI re-checking this pack's requirements.txt on every launch. It's noise, not an error.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| Gemini_API | STRING | Get API: https://aistudio.google.com/apikey | |
| max_size_input | INT | 00–2048 | Giới hạn kích thước ảnh |
| preset | COMBO | Preset prompt cho tạo ảnh. | |
| prompt | STRING | Nội dung yêu cầu chính | |
| sub_prompt | STRING | Prompt phụ, ghép giống node chatbot | |
| translate | COMBO | english | Ngôn ngữ dịch |
| seed | INT | 00–18446744073709550000 | The random seed |
| show_preview | BOOLEAN | true | Hiển thị preview ảnh output trên node |
| imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| prompt | STRING | — |