Nodes/ComfyUI-Artha-Nodes/πŸ”± Artha Gemini Vision
ComfyUI Node

πŸ”± Artha Gemini Vision

Artha Gemini Vision is a captioning workhorse

By CyrostarΒ·Created 10 months agoΒ·Updated 8 months agoΒ· 0
πŸ”± Artha Gemini Vision
  • image
  • response
β—„text_promptDescribe this image in detail.β–Ί
β—„api_keyβ–Ί
β—„modelgemini-2.5-flashβ–Ί
β—„max_tokens5000β–Ί
β—„temperature0.7β–Ί
β—„system_instructionβ–Ί

Artha Gemini Vision is the πŸ”± Artha pack's image captioner: point it at any image in your graph and it returns a rich text description of what's there. It's the node the pack's own Style and Subject nodes secretly use under the hood when you flip on use_image, and it's also the one you'd reach for directly when you want to caption a batch, re-describe a generated image for a follow-up pass, or just check what a reference actually contains before you build a prompt around it.

The pitch is simple: local captioning models are good but generic, and they're another model to download. This is a zero-download cloud call that returns surprisingly detailed prose, with the caveat that it costs a bit of API quota per image.

How it works

The node converts your IMAGE tensor to a PIL image, then calls Gemini's generate_content with the image attached and a system instruction framing the task. By default it loads a bundled vision agent prompt from nodes/llm/agents/vision.txt, which is what makes the descriptions rich instead of stilted. The response is stripped of markdown artifacts (* and #) and returned as a plain string.

The system_instruction input is the interesting escape hatch - leave it empty and you get the built-in agent behavior, or override it to steer the output entirely ("list only the objects", "describe the lighting", "output a JSON summary"). That single field turns a generic captioner into whatever you need.

Inputs that matter

  • image - the required IMAGE input.
  • text_prompt - your ask, defaults to "Describe this image in detail."
  • system_instruction - optional; overrides the bundled vision agent when filled in.
  • api_key, model, max_tokens, temperature - the standard Artha Gemini block; model defaults to gemini-2.5-flash.

Output is a single response STRING. Wire it to a text display, into a prompt, or downstream to other text nodes.

Installing it

Same one-pack install as all Artha nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/ComfyUI-Artha-Nodes
pip install -r ComfyUI/custom_nodes/ComfyUI-Artha-Nodes/requirements.txt

then restart ComfyUI, or install "ComfyUI-Artha-Nodes" via ComfyUI Manager. Dependencies are google-genai plus the usual torch/numpy/Pillow stack - no local vision models. You need a Gemini API key from aistudio.google.com: set it in the pack's api.json (gemini_api_key), as a GEMINI_API_KEY env var, or in the node's api_key field (plain text, as the pack's own tooltip warns).

Common issues

  • Empty response: missing/invalid API key, logged to the console. That's the #1 failure mode for every Artha Gemini node.
  • Big images: the image is sent to the cloud as-is. Very large inputs cost more in processing; downscale upstream if you're captioning a lot of huge renders.
  • Quota burn: batch-captioning a whole folder of images is a real token spend. It's metered, not free-unlimited.
  • Descriptions strip markdown: intentional - the node removes * and #. If you asked for markdown formatting, it'll come back cleaned anyway.

Where it wins over local captioners: zero setup, and the descriptions are genuinely detailed without you having to prompt-tune a local model. Where it loses: it needs the network and a key, and it's not free. For a few reference images or a mid-pipeline description pass, that trade is worth it; for mass captioning of training datasets, go local.

CategoryArtha/LLM/Gemini

Inputs (7)

NameTypeDefaultDescription
imageIMAGEβ€”
text_promptSTRINGDescribe this image in detail.β€”
api_keySTRINGAPI key will be visible in plain text. Consider adding your api to the api.json located inside this custom node folder.
modelCOMBOgemini-2.5-flash5 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite
max_tokensINT50001–8192For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60–80 English words.
temperatureFLOAT0.70–2A temperature of 0 means only the most likely tokens are selected. Higher values increase randomness.
system_instructionoptSTRINGβ€”

Outputs (1)

NameTypeDescription
responseSTRINGβ€”