Nodes/ERPK Collection/Gemini Vision
ComfyUI Node

Gemini Vision

Ask questions about an image, get answers back

By eRepublik-Labs·Created 12 months ago·Updated 4 days ago· 2
Gemini Vision
  • image
  • client
  • analysis
◄promptDescribe this image in detail.►
◄seed-1►
◄modelgemini-3.5-flash►
◄max_tokens8192►
◄temperature0.40►
◄top_p0.95►
◄top_k40►
◄stop_sequences►
◄response_mime_typedefault►
◄response_schema►
◄thinking_levelnone►

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.

CategoryERPK/Gemini

Inputs (13)

NameTypeDefaultDescription
imageIMAGEImage(s) to analyze (ComfyUI tensor)
promptSTRINGDescribe this image in detail.Question or instruction about the image(s)
seedINT-1-1–2147483647Seed for reproducible outputs. Randomizes by default.
clientoptGEMINI_API_CLIENTGemini API client from Gemini API Config node (optional if API key is configured in Settings)
modeloptCOMBOgemini-3.5-flashGemini model to use for vision analysis
max_tokensoptINT8192256–65536Maximum length of analysis
temperatureoptFLOAT0.400–2Creativity level (lower=more factual)
top_poptFLOAT0.950–1Nucleus sampling - cumulative probability threshold (0.0=disabled)
top_koptINT40-1–100Top-k sampling - limit token selection (0=disabled)
stop_sequencesoptSTRINGStop generation at these sequences (one per line, leave empty to disable)
response_mime_typeoptCOMBOdefaultOutput format (use application/json for JSON mode)
response_schemaoptSTRINGJSON schema for structured output (only used with application/json, leave empty for free-form JSON)
thinking_leveloptCOMBOnoneReasoning 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)

NameTypeDescription
analysisSTRING—