🎨 Nano Banana 2 (Gemini 3.1)
Nano Banana 2 in ComfyUI
- image
- image
- text_output
- prompt
This is the newest of the three Nano Banana nodes in the SDVN pack - Nano Banana 2, Gemini 3.1 Flash Image, which landed around February 2026 as Google's speed-quality hybrid. Think of it as sitting between the two others: quicker and cheaper than the Gemini 3 Pro node, noticeably better than the older Gemini Flash 2 one. It's an API node, so a Google key is mandatory and nothing runs locally.
Practically, this is the one to default to for iterative work. It gives you the Pro-style controls - aspect ratio, resolution presets, a text output alongside the image - without the Pro price tag, and it adds a genuinely economy resolution setting the others don't have.
How it works
Prompt (and optional reference image) go to the Gemini 3.1 Flash API, an image and a bit of text come back. Same SDVN conveniences as its siblings: Google Translate on the text fields and dynamic-prompt/wildcard support, so {a|b|c} syntax and non-English prompts both work. The reference image goes through the single image input; pass a batch there when you want multi-image conditioning.
The inputs and outputs that matter
Gemini_API- your key, or leave blank to read it from the pack'sAPI_key.json.prompt/sub_prompt- main instruction plus a second detail box.image(optional) - reference image(s) for editing or consistency instead of pure text-to-image.aspect_ratio- a wide list (Auto,1:1,16:9,9:16,21:9,1:4, and more). Set it explicitly when framing matters.resolution-0,5K,1K,2K,4K. That0,5K(half-K) option is the draft setting the other Nano Banana nodes don't offer - cheapest and fastest for throwaway iterations, then bump to2K/4Kfor the keeper.
Three outputs: image, text_output (the model's accompanying text), and prompt (the final translated prompt that was sent).
How to install it
ComfyUI Manager: search SDVN_Comfy_node, install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart. Key from aistudio.google.com/app/apikey; put it in API_key.json (rename API_key.json.example) rather than in the node so it stays out of your saved workflows.
Common issues & troubleshooting
Cost creeps at high resolution. The resolution dropdown is your bill. Iterate at 0,5K or 1K, only push to 4K when you've locked the prompt.
Refused or empty images. Gemini's safety filter is strict - the January 2026 policy update tightened it, especially around real people and famous IP. A blocked prompt returns nothing; it's server-side, not something the node controls.
SynthID watermark. As with every Gemini image, there's an invisible watermark embedded. Doesn't affect the look; does affect provenance.
Works one day, errors the next with the same key. Usually quota or billing on the Google side. Confirm the key still generates in Google AI Studio before blaming the node. And the "Requirement already satisfied" lines in your console at startup are just ComfyUI re-checking this pack's dependencies - ignore them.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| Gemini_API | STRING | Get API: https://aistudio.google.com/apikey | |
| 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 | |
| aspect_ratio | COMBO | Auto | Tỷ lệ khung hình |
| resolution | COMBO | 1K | Độ phân giải |
| translate | COMBO | None | 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 | Ảnh tham khảo (Tối đa 14 ảnh) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| text_output | STRING | — |
| prompt | STRING | — |