Set Gemini LLM Service Connector ๐
ComfyUI Node Guide
- llm_service_connector
Quick clarification before anything else, because it trips people up: this node talks to Gemini the chat model, not "Nano Banana," Google's Gemini-native image generator. Same underlying family, completely different job. If you're after image generation you want a different node entirely; this one is for text - writing prompts, translating, rewriting captions - and it happens to be one of the more capable connectors in the pack because the README specifically calls it out as multimodal-aware: image input gets forwarded to Gemini as inline data, so a downstream node like the pack's prompt generators can hand Gemini a reference image and get back a description or a rewritten prompt that actually accounts for what's in the picture.
Like every Set*LLMServiceConnector node in ComfyUI-MieNodes, this one doesn't call anything by itself. It resolves your API key and model choice into an LLMServiceConnector object and stops. The actual request happens in whatever you wire the output into - the pack's Translator node, BerniniPromptGenerator, the Kontext prompt workflow. Drop this node alone in an empty graph and nothing happens, which is correct behavior, not a bug.
Inputs that matter. api_token is your Gemini key (starts AIza...), from Google's AI Studio or the Gemini API console. model_select gives you eight choices, defaulting to gemini-3.1-pro - the current flagship at time of writing, alongside a preview variant, the faster gemini-3-flash and gemini-3.1-flash-lite, and the older gemini-2.5-* line for anyone who wants a known quantity. There's also a Custom entry right in the dropdown; pick that and fill in custom_model with any model ID Google ships that isn't in this list yet - useful the day Google announces something new and this node's dropdown hasn't caught up.
The config-file gotcha. Same as every other connector here: prefer_local_config defaults to true, which means the node reads mie_llm_keys.json (copied from mie_llm_keys.json.example, kept next to the README, deliberately not committed) and uses the gemini entry there over anything typed into api_token on the node itself. If you're staring at an auth error despite typing in a key that looks correct, this is almost always why. Either fill the JSON file's gemini slot and leave the node's field blank, or flip prefer_local_config off so the node's own input takes priority - handy when you keep a placeholder key in the file and want to swap in a real one per-workflow. config_key lets you read a different entry from the same file if you're juggling multiple Gemini accounts or projects.
Install. Search "ComfyUI_MieNodes" in ComfyUI Manager, or git clone https://github.com/MieMieeeee/ComfyUI-MieNodes into ComfyUI/custom_nodes and restart. There's nothing to download for this node specifically - no weights, no dependencies beyond network access and a funded (or free-tier) Google AI account.
Troubleshooting. Beyond the config-file precedence above, the two failure modes worth knowing: first, if you feed an image through a downstream node expecting Gemini to see it, confirm that node actually supports the multimodal path - not every consumer in this pack forwards images, and the README is explicit that Gemini specifically is the one built to receive them. Second, model IDs on Google's side churn faster than this dropdown gets updated; if a selected model starts 404ing, that's usually a retirement on Google's end rather than anything wrong in the node, and custom_model with the current ID from Google's own docs is the fix. This pack itself is small and newer - you won't find much community discussion of it yet, so when something breaks, the README and the node's own error text are your best first stop before assuming it's a known issue.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| api_token | STRING | โ | |
| model_select | COMBO | gemini-3.1-pro | 8 options: gemini-3.1-pro, gemini-3.1-pro-preview, gemini-3-flash, gemini-3.1-flash-lite, gemini-2.5-pro, gemini-2.5-flash, +2 |
| custom_modelopt | STRING | โ | |
| config_fileopt | STRING | mie_llm_keys.json | โ |
| config_keyopt | STRING | gemini | โ |
| prefer_local_configopt | BOOLEAN | true | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llm_service_connector | LLMServiceConnector | โ |