Nodes/PromptModels Studio/Google AI - Vision Analyzer
ComfyUI Node

Google AI - Vision Analyzer

Point Gemini at up to five images, get text back

By cdanielp·Created 9 months ago·Updated 2 months ago· 28
Google AI - Vision Analyzer
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • analysis
promptDescribe esta imagen en detalle.
modelgemini-3.1-pro-preview
api_key
system_prompt

GoogleAI_TextVisionNode is the dedicated vision slot of this pack: one required image, up to four optional extras, a prompt, and a Gemini model that looks at all of them and returns its analysis as a STRING. It overlaps with GoogleAI_TextNode's image inputs, but it's built around vision as the point rather than an afterthought - the image is the required input here, and the output is named analysis to keep the intent obvious.

What it's for

Anything where you need a model to read pixels and report back in words. Auto-caption your generations so you can log or reuse the descriptions. Compare a rendered frame against a reference set and have Gemini say how close they are. Ask what changed between image 1 and image 2 in a variation batch. Because you can pass up to five images at once, it's also good for asking for a style consensus across references - "what do these five have in common?" - which is exactly the kind of analysis that feeds back into prompt writing.

How it works

Each connected image is base64-encoded and sent alongside your prompt to Gemini's generateContent endpoint over plain REST (no SDKs). The reply comes back as the analysis string. Key resolution is the pack standard - node field, then GEMINI_API_KEY env var, then the pack's .env - and errors surface as ❌ Error: … strings rather than killing the queue. Like every node in this pack's Google family, it's a metered hosted call: free node, paid API, so don't wire it into a loop that runs 500 times per batch and then act surprised.

Inputs and outputs that matter

  • image_1 (IMAGE) - required, the main image. This one must be connected.
  • prompt (STRING, multiline, default "Describe esta imagen en detalle.") - what you want to know. This is where you'll actually spend your effort.
  • model (COMBO, default gemini-3.1-pro-preview) - which Gemini does the looking. Flash-class is cheaper for simple captions; the pro default thinks harder.
  • image_2 … image_5 (IMAGE) - optional extra images for multi-image comparisons or context.
  • system_prompt, api_key - system instruction and key override.
  • analysis (STRING) - the output. Feed it to a text widget, a conditioner, or a save node.

Installing it

One of the 15 legacy-but-active Google nodes in COMFYUI_PROMPTMODELS (PromptModels Studio in Manager):

cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS

Add GEMINI_API_KEY=AI... to the pack's .env and restart. Needs ComfyUI 0.26.0+ for the pack to load. Nothing to download; the model is hosted.

Common issues

The recurring one is treating it as free: a captioning loop over hundreds of frames is real API spend, and the "pro preview" default is the pricier end. Drop to a flash model for bulk captioning. If you get an error string back, it's usually a key problem (missing or malformed GEMINI_API_KEY) or a model ID that's been retired - the pack keeps aliases for some dead IDs, but not forever. And keep keys in .env; a key in the node field rides along in workflow JSON and PNG metadata.

CategoryGoogle AI/Text

Inputs (9)

NameTypeDefaultDescription
image_1IMAGEImagen principal (obligatoria).
promptSTRINGDescribe esta imagen en detalle.
modelCOMBOgemini-3.1-pro-preview4 options: gemini-3.1-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash
api_keyoptSTRING
system_promptoptSTRING
image_2optIMAGEImagen adicional 2 (opcional).
image_3optIMAGEImagen adicional 3 (opcional).
image_4optIMAGEImagen adicional 4 (opcional).
image_5optIMAGEImagen adicional 5 (opcional).

Outputs (1)

NameTypeDescription
analysisSTRING