Gemini 3 Pro LLM π
A Gemini 3 LLM inside your ComfyUI graph β no GPU, just an API key
- images
- chat_metadata
- text
- operation_log
- chat_metadata
Gemini 3 Pro LLM π is half of a two-node pack from Ametist3d whose other half is the Nano Banana image generator. If you've wanted a frontier-chat model sitting in your graph - one that can see the images in your workflow, read them, and write back - this is the cheap way to do it. No 8B model fighting your GPU for VRAM, no GGUF loader, no Ollama server to babysit. Just an API key and a round trip to Google's servers.
Let's be straight about what it's for, though. The LLM-in-ComfyUI essay in our knowledge base has a clear decision tree, and it says most prompt-rewriting jobs are better served by a small local model: free, offline, uncensored. You reach for an API node like this when you want genuine frontier-chat quality and don't care about cost or privacy, or when you want a model that can see - because this node takes actual image tensors, base64-encodes them, and ships them up as multimodal input. That's the use case worth caring about: chaining "describe this render" or "summarize what just got generated" into a workflow without standing up a second model runtime.
How it works
Under the hood there's no SDK magic. The node builds a request with pydantic models and fires a direct HTTP generateContent call at generativelanguage.googleapis.com via aiohttp. Pick from the model combo (gemini-3-pro-preview default, plus 3 Flash, 2.5 Pro/Flash/Lite, 2.0 Flash), and optionally attach the googleSearch tool for grounding - but only models Google lists as supporting it actually get the tool, and the operation_log tells you when it silently dropped your request.
The only inputs you'll actually touch:
- prompt - the thing you're asking it to do.
- model - the combo box; the default is fine until you need a cheaper/faster tier.
- enable_google_search - up-to-date answers, but it costs extra and only works on supported models.
- temperature and seed - seed 0 is random; set it if you want reproducible generations.
The optional stuff is where the node gets interesting: system_prompt for personality, images for vision, and chat_metadata which carries conversation history. The node outputs three things: text (wire it to a display, a text file, or downstream into a prompt), operation_log (a plain-text breadcrumb of what the API actually did - check this first when something looks off), and chat_metadata (loop it straight back into the chat_metadata input and the node keeps the conversation going turn after turn).
Installing it
It's one pack, so install steps are shared with the image node: ComfyUI Manager (search "Gemini3ProImagePreview") or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/Ametist3d/ComfyUI_Gemini3ProImagePreview
cd ComfyUI_Gemini3ProImagePreview
pip install -r requirements.txt
Then restart ComfyUI. Note the requirements.txt lists google-generativeai and requests, but the shipped code never imports either - it runs on aiohttp plus Pillow/numpy/torch, which your ComfyUI install already has. A lighter requirements file would've been honest, but nothing about it breaks.
The trap: where the API key goes
The README tells you to run setx GEMINI_API_KEY on Windows. That will not work. The code never reads the OS environment - it loads the key from files, in this order: ~/comfyui_google_api_key.env, then a .env file sitting in the node's folder with a GEMINI_API_KEY=... line. The first one found wins, and it's cached for the session. So the reliable setup is:
echo 'GEMINI_API_KEY=AIza...' > ~/comfyui_google_api_key.env
Restart ComfyUI after. If the key's missing you get a ValueError that spells out both file paths, which at least makes the failure obvious.
Common issues
The two you'll actually hit: forgetting the key (above) and billing surprises - every call costs money, and enabling Google Search bumps the tab. Also keep the API's safety filters in mind: Gemini is a censored API, so content Google flags comes back empty or refused, no local settings can talk it out of that. When in doubt, check the operation_log - it tells you the model, whether grounding attached, and the response length, which usually points at whether the problem was you or the API.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Text prompt for the LLM. | |
| model | COMBO | gemini-3-pro-preview | Gemini model to use for text generation. |
| enable_google_search | BOOLEAN | false | Enable Google Search grounding for up-to-date information. |
| temperature | FLOAT | 1.000β2 | Controls randomness. Lower = more focused, higher = more creative. |
| seed | INT | 00β2147483647 | Seed for reproducibility. Set to 0 for random. |
| top_popt | FLOAT | 0.950β1 | Nucleus sampling threshold. |
| top_kopt | INT | 401β100 | Top-k sampling. |
| max_tokensopt | INT | 81921β65536 | Maximum output tokens. |
| imagesopt | IMAGE | Optional image(s) for multimodal input. | |
| system_promptopt | STRING | System instructions for the model. | |
| chat_metadataopt | GEMINI_CHAT_METADATA | Conversation metadata for multi-turn chat. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |
| operation_log | STRING | β |
| chat_metadata | GEMINI_CHAT_METADATA | β |