Nodes/ComfyUI-YogurtNodes/Gemini Image Understand
ComfyUI Node

Gemini Image Understand

Your images, described by Gemini — no local model, no VRAM cost

By yogurt7771·Created 2 years ago·Updated 4 days ago· 1
Gemini Image Understand
  • image
  • image1
  • image2
  • image3
  • image4
  • history
  • text
  • history
  • thought
api_key
vertexfalse
base_url
model_namegemini-2.5-flash
system_prompt
prompt
temperature1.00
top_p0.00
top_k0
max_output_tokens65535
retry_count1
disable_safety_settingsfalse
disable_system_promptfalse
safety_levelBLOCK_NONE
thinking_budget0
chat_template<-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user->
proxy_url
seed-1
thinking_levelOFF
timeout0
extra{}

Want a node that actually reads your images back to you - captions, questions about composition, structured data pulled out of a render - without downloading a single local model? This is that node. Gemini Image Understand takes up to five images and a prompt, ships them to Google's Gemini API, and hands you back text, a chat history you can chain, and even the model's thought.

It's part of the YogurtNodes pack (yogurt7771/ComfyUI-YogurtNodes), a grab-bag of ~150 utilities that includes a whole family of these LLM nodes - Gemini, OpenAI, Grok, Qwen, OpenRouter. The appeal is the same across all of them: your generation stays on the GPU, and the language/vision stuff happens in the cloud. Great for auto-captioning a batch before you LoRA-train, or for building a "describe what you see and re-prompt" loop.

How it works

Under the hood it's a thin wrapper around the google-genai client. Your IMAGE tensors get fed to whatever model you name in model_name (default gemini-2.5-flash), and the returned text becomes the text output. Because it's a real chat call, you also get a history output you can feed back into the node on the next run for multi-turn conversation - handy when you're iterating on a description.

The thought output is the sneaky-good part. With a thinking-capable model and thinking_budget set above 0, Gemini's chain-of-thought comes back on its own pin. I've seen people wire that into a second node to steer prompting. You don't have to use it; it's just there if you want it.

Inputs that matter

Most of the required fields are per-call knobs you can leave alone. The ones you'll actually touch:

  • prompt - what you want said about the image. "Describe in detail" is a fine starting point; this is where you get specific.
  • image, image1image4 - up to five images. Wire in any IMAGE output. If you need more than five, feed them as a batch and loop, or string them through history.
  • model_name - gemini-2.5-flash is the default and the sensible default. It's fast, cheap, and vision-capable.
  • thinking_budget - 0 disables thinking (faster), -1 means don't limit it. Default 0 is the right call for quick captioning.

Then there's api_key - leave it blank and the node falls back to an api_key.json file in custom_nodes/ComfyUI-YogurtNodes/yogurt_nodes/llm/ with {"gemini": "YOUR_API_KEY"}, then to the GEMINI_API_KEY environment variable. The README spells all three out. Outputs: text, history, thought.

Install

Same as every Yogurt node: ComfyUI Manager → search "YogurtNodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt

The Gemini nodes need google-genai, which the pack's requirements install. Restart ComfyUI and look under Yogurt Nodes / LLM. No models, no checkpoints, no VRAM.

Troubleshooting

The README is blunt: if the API key isn't configured, "Gemini nodes will not work." Grab one at Google AI Studio. If your call fails, that's your first suspect.

A few things that bite people:

  • vertex toggle - flips the client to Vertex AI mode (useful if you're on GCP and getting billed there instead). If you're not on Vertex, leave it off; a stray true gives you a confusing auth error.
  • thinking_budget at 0 - this is the default, so if you were expecting deep reasoning and getting one-liners, that's why. Set it to -1 or a token budget.
  • proxy_url - the tooltip accepts protocol://user:pass@addr:port including socks5/socks5h. If you're behind a proxy or VPN, this is where you set it.
  • Big images, slow replies - there's no local encode; everything goes over the network. timeout defaults to 0 (never), so a stalled request can hang your queue. Setting a sane timeout in seconds is worth doing in production workflows.

If you just want a quick local sanity check that the key works before wiring a big workflow, prompt it on a test image with model_name left as-is - a one-liner back means you're good.

CategoryYogurtNodes/LLM

Inputs (27)

NameTypeDefaultDescription
api_keySTRINGAPI key for accessing Gemini API
vertexBOOLEANfalseUse Vertex AI for Gemini API
base_urlSTRINGBase URL for Gemini API
model_nameSTRINGgemini-2.5-flashGemini model name, default is gemini-2.5-flash
system_promptSTRINGSystem-level prompt that affects the overall conversation style
promptSTRINGMain prompt content input by the user
temperatureFLOAT1.00Sampling temperature, higher values produce more random outputs
top_pFLOAT0.000–1Sampling probability threshold, controls output diversity
top_kINT0Number of highest probability tokens to consider during sampling
max_output_tokensINT655350–2147483647Maximum number of tokens in the generated text
retry_countINT1Number of retries when request fails
disable_safety_settingsBOOLEANfalseWhether to disable safety settings, if true, the safety settings will not be set
disable_system_promptBOOLEANfalseWhether to disable the system prompt, if true, the system prompt will sent as a user prompt
safety_levelCOMBOBLOCK_NONESafety level for the generated text
thinking_budgetINT0-1–2147483647Thinking budget for the model, if set to -1, the model will not limit thinking budget, if set to 0, the model will disable thinking
chat_templateSTRING<-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user->Content template for the generated text
proxy_urlSTRING代理URL,格式: protocol://user:pass@addr:port,支持http,https,socks5,socks5h
seedINT-1-1–2147483647随机种子,设置为-1时随机种子
thinking_levelCOMBOOFFThinking level for the model, if thinking budget is not 0, this parameter will be ignored
timeoutINT00–2147483647Timeout for the request in seconds, 0 means no timeout
imageoptIMAGE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
historyoptHISTORY
extraoptSTRING{}Extra parameters for the request, in JSON format

Outputs (3)

NameTypeDescription
textSTRING
historyHISTORY
thoughtSTRING