Nodes/ComfyUI_Gemini3ProImagePreview/Gemini 3 Pro LLM πŸ”
ComfyUI Node

Gemini 3 Pro LLM πŸ”

A Gemini 3 LLM inside your ComfyUI graph β€” no GPU, just an API key

By Ametist3dΒ·Created 6 months agoΒ·Updated 6 months agoΒ· 1
Gemini 3 Pro LLM πŸ”
  • images
  • chat_metadata
  • text
  • operation_log
  • chat_metadata
β—„promptβ–Ί
β—„modelgemini-3-pro-previewβ–Ί
β—„enable_google_searchfalseβ–Ί
β—„temperature1.00β–Ί
β—„seed0β–Ί
β—„top_p0.95β–Ί
β—„top_k40β–Ί
β—„max_tokens8192β–Ί
β—„system_promptβ–Ί

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.

Categoryapi node/text/Gemini

Inputs (11)

NameTypeDefaultDescription
promptSTRINGText prompt for the LLM.
modelCOMBOgemini-3-pro-previewGemini model to use for text generation.
enable_google_searchBOOLEANfalseEnable Google Search grounding for up-to-date information.
temperatureFLOAT1.000–2Controls randomness. Lower = more focused, higher = more creative.
seedINT00–2147483647Seed for reproducibility. Set to 0 for random.
top_poptFLOAT0.950–1Nucleus sampling threshold.
top_koptINT401–100Top-k sampling.
max_tokensoptINT81921–65536Maximum output tokens.
imagesoptIMAGEOptional image(s) for multimodal input.
system_promptoptSTRINGSystem instructions for the model.
chat_metadataoptGEMINI_CHAT_METADATAConversation metadata for multi-turn chat.

Outputs (3)

NameTypeDescription
textSTRINGβ€”
operation_logSTRINGβ€”
chat_metadataGEMINI_CHAT_METADATAβ€”