Gemini Vision
Ask questions about an image, get answers back
- image
- client
- analysis
Claude has its vision node in this pack; this is Gemini's answer. Feed it an IMAGE tensor and a prompt, and it returns a text analysis - captioning, defect-checking, describing a reference image, evaluating a render. The batch-friendly detail: the image input takes a tensor batch, so you can dump multiple frames into one call and ask a question across all of them.
Mechanically it's the same shape as Gemini Text Generation - same model dropdown (default gemini-3.5-flash), same sampling knobs, same response_mime_type/response_schema JSON-mode pair, same thinking_level translation between 2.5 and 3.x models - but with an image input instead of a text prompt as the required field. The prompt is still required too, defaulting to "Describe this image in detail."
Inputs you'll actually set
- image - required tensor(s).
- prompt - required. Ask specifically: "list the anatomical errors in this render" beats "what do you see?"
- model - default
gemini-3.5-flash; bump to a Pro model for harder analysis. Cheap for flash, so start there. - temperature - 0.4 default. Lower = more factual; the tooltip says it straight.
- max_tokens - 8192 default, plenty for a thorough answer.
- top_p / top_k / stop_sequences / response_mime_type / response_schema / thinking_level - same semantics as the text node; JSON mode works here too if you want a structured analysis object.
- seed - cache control, -1 randomizes.
Output: analysis, a single STRING. Wire to Preview Anything, or - the power move - back into another node's prompt input to build a self-correcting loop (generate, critique, regenerate).
Install and gotchas
Part of the ERPK Collection:
cd ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk && pip install -r requirements.txt
Restart (or ComfyUI Manager → search erpk), add a Google AI Studio key in Settings > ERPK > API Keys. Paid per call, but Flash vision is cheap.
Where people stumble: forgetting that the image input is a batch socket and treating it like a single image picker (it handles both, but a batch of N sends all N in one call, which bills accordingly). And if analysis keeps coming back shallow, it's almost always the temperature or the prompt specificity - 0.4 is not 0, and "describe" invites a paragraph instead of a checklist. For consistent, comparable output across runs, fix the seed.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image(s) to analyze (ComfyUI tensor) | |
| prompt | STRING | Describe this image in detail. | Question or instruction about the image(s) |
| seed | INT | -1-1–2147483647 | Seed for reproducible outputs. Randomizes by default. |
| clientopt | GEMINI_API_CLIENT | Gemini API client from Gemini API Config node (optional if API key is configured in Settings) | |
| modelopt | COMBO | gemini-3.5-flash | Gemini model to use for vision analysis |
| max_tokensopt | INT | 8192256–65536 | Maximum length of analysis |
| temperatureopt | FLOAT | 0.400–2 | Creativity level (lower=more factual) |
| top_popt | FLOAT | 0.950–1 | Nucleus sampling - cumulative probability threshold (0.0=disabled) |
| top_kopt | INT | 40-1–100 | Top-k sampling - limit token selection (0=disabled) |
| stop_sequencesopt | STRING | Stop generation at these sequences (one per line, leave empty to disable) | |
| response_mime_typeopt | COMBO | default | Output format (use application/json for JSON mode) |
| response_schemaopt | STRING | JSON schema for structured output (only used with application/json, leave empty for free-form JSON) | |
| thinking_levelopt | COMBO | none | Reasoning depth. 'none' sends no thinking setting, so the model thinks at its own default level (it does not turn thinking off). minimal is raised to low on models that reject it: 3.1 Pro Preview, 3.7 Flash, 3.8 Flash. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| analysis | STRING | — |