Gemini Image Understand
Your images, described by Gemini — no local model, no VRAM cost
- image
- image1
- image2
- image3
- image4
- history
- text
- history
- thought
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,image1–image4- 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 throughhistory.model_name-gemini-2.5-flashis the default and the sensible default. It's fast, cheap, and vision-capable.thinking_budget-0disables thinking (faster),-1means don't limit it. Default0is 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:
vertextoggle - 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_budgetat0- this is the default, so if you were expecting deep reasoning and getting one-liners, that's why. Set it to-1or a token budget.proxy_url- the tooltip acceptsprotocol://user:pass@addr:portincluding 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.
timeoutdefaults to 0 (never), so a stalled request can hang your queue. Setting a sanetimeoutin 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.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | API key for accessing Gemini API | |
| vertex | BOOLEAN | false | Use Vertex AI for Gemini API |
| base_url | STRING | Base URL for Gemini API | |
| model_name | STRING | gemini-2.5-flash | Gemini model name, default is gemini-2.5-flash |
| system_prompt | STRING | System-level prompt that affects the overall conversation style | |
| prompt | STRING | Main prompt content input by the user | |
| temperature | FLOAT | 1.00 | Sampling temperature, higher values produce more random outputs |
| top_p | FLOAT | 0.000–1 | Sampling probability threshold, controls output diversity |
| top_k | INT | 0 | Number of highest probability tokens to consider during sampling |
| max_output_tokens | INT | 655350–2147483647 | Maximum number of tokens in the generated text |
| retry_count | INT | 1 | Number of retries when request fails |
| disable_safety_settings | BOOLEAN | false | Whether to disable safety settings, if true, the safety settings will not be set |
| disable_system_prompt | BOOLEAN | false | Whether to disable the system prompt, if true, the system prompt will sent as a user prompt |
| safety_level | COMBO | BLOCK_NONE | Safety level for the generated text |
| thinking_budget | INT | 0-1–2147483647 | Thinking 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_template | STRING | <-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user-> | Content template for the generated text |
| proxy_url | STRING | 代理URL,格式: protocol://user:pass@addr:port,支持http,https,socks5,socks5h | |
| seed | INT | -1-1–2147483647 | 随机种子,设置为-1时随机种子 |
| thinking_level | COMBO | OFF | Thinking level for the model, if thinking budget is not 0, this parameter will be ignored |
| timeout | INT | 00–2147483647 | Timeout for the request in seconds, 0 means no timeout |
| imageopt | IMAGE | — | |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| historyopt | HISTORY | — | |
| extraopt | STRING | {} | Extra parameters for the request, in JSON format |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| history | HISTORY | — |
| thought | STRING | — |