NanoBanana - Model Selector
Pick a Gemini model from one dropdown, with a sanity check built in
- model
Every NanoBanana node already has its own model dropdown, so a standalone Model Selector sounds redundant - and honestly, for a single-node workflow it is. Where it earns its keep is centralizing the model choice in one place and routing it to several nodes, or giving you a single override point when you want to point everything at a custom model ID without editing five widgets.
The node lists every model the pack knows about - text, image, Imagen, TTS, Veo, Lyria, embeddings - in one giant dropdown, lets you type a custom ID for whatever Google shipped last Tuesday, and optionally validates that your pick actually belongs to the category you claim it does.
How it works
The dropdown is static, meaning it's baked in when ComfyUI loads the pack. You pick a model, and the node outputs the model ID string. That's it - a STRING out of model, which you feed into any other NanoBanana node's model input... wait, no. The model inputs on action nodes are their own dropdowns, not free STRING inputs. So the practical pattern here is: pick a model, and either wire the string into a downstream node's custom_model override field, or use the Model Selector's output to drive logic - comparing models, feeding a text display, driving a switcher.
The interesting knob is category_validate. Set it to, say, image_gen and the node will raise an error at runtime if the selected model isn't in the image-generation list. It catches the classic mistake: picking imagen-4.0-generate-001 (which belongs to the Imagen predict endpoint) when you meant to feed a Nano Banana model into a generate_content-based node. The validation is skipped when you supply a custom_model override, because the whole point of the override is that the pack doesn't know about it yet.
The fields
- model - the dropdown of all known Gemini/Imagen/Veo/Lyria/embedding models.
- category_validate -
any, ortext,image_gen,imagen,tts,veo,lyria,embedding. Runtime guard against picking the wrong flavor. - custom_model - free-text override that takes priority over the dropdown.
Output: model, a STRING.
Installation
It's part of the NanoBanana2 pack, so installing the pack gives you this node along with all the others:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-NanoBanana2
pip install google-genai
ComfyUI Manager works too - search NanoBanana2. Requires Python 3.10+ and a Gemini API key from aistudio.google.com for anything downstream of it.
Gotchas
Because dropdowns are static, the Model Selector's list can lag reality - that's exactly what the custom_model field is for, so don't panic when a brand-new preview model isn't in the list yet. And note this node does zero API calls on its own; it's pure selection and validation. If you're not sharing a model across multiple nodes or doing something clever with the output string, you can just skip it and use the dropdowns on the nodes themselves.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | gemini-pro-latest | Select any Gemini/Imagen/Veo/Lyria/Embedding model. |
| category_validate | COMBO | any | Validate that the selected model matches this category. Raises an error at runtime if not. Helps catch mistakes like 'imagen-...' selected for a text node. |
| custom_modelopt | STRING | Override with a custom model ID (leave blank to use dropdown). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | STRING | — |