Nodes/SDVN_Comfy_node/🎨 Nano Banana 2 (Gemini 3.1)
ComfyUI Node

🎨 Nano Banana 2 (Gemini 3.1)

Nano Banana 2 in ComfyUI

By StableDiffusionVN·Created 2 years ago·Updated about a month ago· 118
🎨 Nano Banana 2 (Gemini 3.1)
  • image
  • image
  • text_output
  • prompt
Gemini_API
preset
prompt
sub_prompt
aspect_ratioAuto
resolution1K
translateNone
seed0
show_previewtrue

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's API_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. That 0,5K (half-K) option is the draft setting the other Nano Banana nodes don't offer - cheapest and fastest for throwaway iterations, then bump to 2K/4K for 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.

Category📂 SDVN/💬 API

Inputs (10)

NameTypeDefaultDescription
Gemini_APISTRINGGet API: https://aistudio.google.com/apikey
presetCOMBOPreset prompt cho tạo ảnh.
promptSTRINGNội dung yêu cầu chính
sub_promptSTRINGPrompt phụ, ghép giống node chatbot
aspect_ratioCOMBOAutoTỷ lệ khung hình
resolutionCOMBO1KĐộ phân giải
translateCOMBONoneNgôn ngữ dịch
seedINT00–18446744073709550000The random seed
show_previewBOOLEANtrueHiển thị preview ảnh output trên node
imageoptIMAGEẢnh tham khảo (Tối đa 14 ảnh)

Outputs (3)

NameTypeDescription
imageIMAGE
text_outputSTRING
promptSTRING