Nodes/ComfyUI-YogurtNodes/Vertex Image Understand
ComfyUI Node

Vertex Image Understand

Give your workflow a second pair of eyes — Gemini looks at your renders

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
Vertex Image Understand
  • image
  • image1
  • image2
  • image3
  • image4
  • history
  • text
  • history
  • thought
credentials
project_id
location
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{}

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 conditional
  • history - the conversation, for follow-up questions
  • thought - 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 YogurtSwitch to 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.

CategoryYogurtNodes/LLM

Inputs (30)

NameTypeDefaultDescription
credentialsSTRINGCredentials JSON for accessing Vertex AI
project_idSTRINGGoogle Cloud project ID
locationSTRINGVertex AI location/region
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