ComfyUI Node

Gemini Text

Gemini 3's brain inside ComfyUI — text in, text out, no local weights

By lazyq666·Created 9 months ago·Updated 6 months ago· 3
Gemini Text
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
  • image_10
  • text
api_key
system_doc
promptExplain this image
modelgemini-3-pro-preview
media_resolutionmedia_resolution_high
thinking_leveldefault
seed-1

Gemini Text is the node that drops Gemini 3's actual reasoning into the middle of a ComfyUI graph. You feed it a prompt and up to ten images, it calls Google's API, and it returns a plain STRING you can pipe anywhere - into a local checkpoint's prompt, into a filename, into another node's input. No local model, no VRAM, no weights to download. This is the "smart friend" node: caption a batch of renders, critique a design, or have Gemini rewrite your prompt into something a local Flux/SD checkpoint actually follows.

The name undersells it. It's not just a text generator - because it accepts images, it's a multimodal analysis node. The classic hybrid workflow is: render locally, send the result here for a critique or a caption, and feed that text back into a local pipeline for round two. Frontier-model reasoning on one side, your local stack on the other, one string between them.

How it works

The node uses the google-genai client under the hood, so everything runs in the cloud. Images you wire in get converted to PNG and sent inline with a media_resolution level that tells the API how hard to downscale them for analysis - high keeps more detail but costs more input tokens. Your system_doc goes through Gemini's system_instruction field, so it shapes behavior without getting stitched into the user prompt. Model options span gemini-3-pro-preview, gemini-3-flash-preview, and the gemini-2.5-* family; thinking_level can be off, low, or high, and seed lets you lock in reproducibility - within Gemini's signed int32 range, more on that below.

Inputs that matter

Most people touch four things:

  • prompt - what you ask, defaults to "Explain this image"
  • system_doc - optional system instructions, like "you are a harsh art critic"
  • model - pro for quality, flash for speed and cost
  • thinking_level - off when you want it fast, high when you want it thorough

The api_key input is where you'd put a key directly, but you don't have to. The pack reads keys from config.json first, falls back to a GEMINI_API_KEY env var, and rotates through multiple keys automatically when one hits a quota/rate-limit error. The output is one text STRING.

Install

Same story as the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/lazyq666/gemini-3-simply-comfyui
pip install -r requirements.txt

Copy config.example.json to config.json and drop your API key(s) in. If you put the pack directly under custom_nodes, ComfyUI's prestartup script auto-installs google-genai when it's missing (disable with GEMINI3_DISABLE_AUTO_INSTALL=1 if your environment blocks it).

Where people get burned

The recurring theme in the community: your Gemini subscription does not cover API usage - you're billed per token separately, so this node isn't free. Keep an eye on resource_exhausted / 429 errors; that's quota, and the node will silently try your next key. If you see No module named 'google', you installed into the wrong Python - use the one ComfyUI actually runs (python3 -m pip install -r requirements.txt on macOS, or the portable install's embedded Python on Windows). And seeds above 2147483647 will error, which is exactly why this pack ships the Gemini Seed (int32) helper - wire it between your seed source and this node.

CategoryGemini 3

Inputs (17)

NameTypeDefaultDescription
api_keySTRING
system_docSTRING
promptSTRINGExplain this image
modelCOMBOgemini-3-pro-preview5 options: gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite
media_resolutionCOMBOmedia_resolution_high4 options: auto, media_resolution_low, media_resolution_medium, media_resolution_high
thinking_levelCOMBOdefault3 options: default, low, high
seedINT-1-1–2147483647
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE
image_7optIMAGE
image_8optIMAGE
image_9optIMAGE
image_10optIMAGE

Outputs (1)

NameTypeDescription
textSTRING