Vertex Image Understand
Give your workflow a second pair of eyes — Gemini looks at your renders
- image
- image1
- image2
- image3
- image4
- history
- text
- history
- thought
Every serious workflow eventually wants a critic in the loop. You render, you look, you tweak, you render again - and a vision model can do that looking step automatically. YogurtVertexAIImageUnderstand is the pack's image-to-text node: feed it an image (up to five), ask it something, and it returns a text description or judgment you can route anywhere in the graph. Caption a render, check that a face came out right, extract what's actually in a frame - the description on the box is "Understand images using Vertex AI," and that's the job.
How it works
It sends your images to Gemini (default model gemini-2.5-flash, a capable and cheap vision pick) through the google-genai SDK, along with your system_prompt and prompt. Outputs:
text- the model's answer as a STRING, ready for a display node or a conditionalhistory- the conversation, for follow-up questionsthought- reasoning trace when thinking is on
Optional image through image4 inputs take the pictures. The auth story is the same as the pack's other Vertex nodes: a vertex toggle decides between a plain Gemini API key (api_key, AI Studio) and full Vertex AI (credentials JSON + project_id + location). Start with vertex off and an AI Studio key - for describing images you don't need Google Cloud.
The patterns people actually build
The three that earn their keep:
- Captioning / tagging. Feed a render, prompt "list the main subjects, lighting, style, and any flaws," and feed the caption back into a prompt-schedule node for style consistency across a batch.
- Quality gate. Ask "is this image sharp and well-composed?" and route the answer through a
YogurtSwitchto decide whether to rerun or accept. This is where a workflow starts to feel autonomous. - Reference description. Describe a reference image so a text-only pipeline can recreate it - a way to turn "this look" into words.
Because text is a plain STRING, the output drops into YogurtStringToValue, YogurtSwitch, or any text socket. That's the nice part of this node's design: it produces the one type everything else in ComfyUI already speaks.
The inputs that matter
prompt(multiline) - what you want to know about the image. Be specific; "describe this" gets you less than "list the objects, lighting, and any visible artifacts."system_prompt- sets the mode ("you are a strict art critic" beats no system prompt for quality-gate work).temperature(default 1) - for judgment tasks, lower is steadier.thinking_budget- a small non-zero budget improves visual reasoning noticeably. Worth experimenting with.
Installing it
Part of the Yogurt Nodes pack (YogurtNodes/LLM), one install for everything:
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt
Or ComfyUI Manager, search "ComfyUI-YogurtNodes," install, restart. API key via GEMINI_API_KEY env var or api_key.json in custom_nodes/ComfyUI-YogurtNodes/yogurt_nodes/llm/ - the README has the file format.
Common issues
Same config pitfalls as the sibling Vertex nodes: wrong vertex toggle, empty credentials, a location where the model isn't served. One this node adds: it's sending your images to Google's servers. If you're generating things you'd rather not upload, don't wire this into that pipeline - use a local vision node instead. And remember it sees a downscaled/encoded version of your image, so it can describe composition and obvious flaws, but don't expect it to read a 4K frame's fine text. Keep the prompt realistic about what a vision API can do.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| credentials | STRING | Credentials JSON for accessing Vertex AI | |
| project_id | STRING | Google Cloud project ID | |
| location | STRING | Vertex AI location/region | |
| 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 | — |