Nodes/ComfyUI-ArchAi3d-Qwen/πŸ€– Gemini API
ComfyUI Node

πŸ€– Gemini API

Ask Gemini to describe your image, right inside the graph

By amir84ferdosΒ·Created 11 months agoΒ·Updated 5 months agoΒ· 70
πŸ€– Gemini API
  • image1
  • image2
  • image3
  • image4
  • response
β—„namegemini_promptβ–Ί
β—„promptDescribe this image in detail.β–Ί
β—„modelgemini-2.5-flashβ–Ί
β—„model_overrideβ–Ί
β—„system_promptβ–Ί
β—„api_keyβ–Ί
β—„temperature1.00β–Ί
β—„top_p0.95β–Ί
β—„top_k40β–Ί
β—„max_tokens8192β–Ί
β—„seed0β–Ί
β—„thinking_budget0β–Ί
β—„use_cachetrueβ–Ί

Somewhere in a Qwen workflow you usually want a plain-language description of the input image - and the model that's best at that is often not the one generating the image. ArchAi3D Gemini is a vision-language API node: it sends up to four images and a prompt to Google's Gemini, and returns the answer as a string you can wire anywhere a prompt string goes. It's the kind of node that slots in before your Qwen encoder to auto-generate the scene description, or after a generation to caption what you made.

The inputs are straightforward. prompt (default "Describe this image in detail.") is what you ask; model defaults to gemini-2.5-flash, which is the sensible default - cheap, fast, and plenty smart for describing interiors. The dropdown includes gemini-2.5-pro, gemini-2.5-flash-lite, the 2.0 line, and a few 3.x previews. system_prompt lets you set a persona ("You are an expert interior designer...") to steer the response. image1 through image4 are plain IMAGE inputs, so you can feed a batch of reference shots.

The knobs that matter

  • api_key - your Google AI Studio key. The node saves it to its own config file after the first successful call, so you only paste it once.
  • temperature, top_p, top_k, max_tokens - standard sampling controls. Defaults (1.0 / 0.95 / 40 / 8192) are fine for captioning.
  • thinking_budget (0-24576, default 0) - this is the interesting one. Turn it on for the 2.5/3.0 models and they get a token budget to reason before answering. For a "describe this room precisely" job it noticeably improves accuracy; for simple captioning it just costs latency.
  • use_cache (default on) - the node hashes its inputs and reuses the previous response if nothing changed. In a looping workflow this saves you paying for the same API call every iteration. Leave it on.
  • model_override - connect the pack's ArchAi3D Gemini Model node here to switch models from another part of the graph, instead of hard-coding the dropdown.

Outputs and install

One output: response, a STRING. Wire it to a ShowText/display node to read it, or straight into a prompt-builder input.

Installation is the pack install, but with a real prerequisite: this node needs the google-genai SDK, and if it's missing the node doesn't even register - the pack silently skips it (the import is wrapped in a try/except). So:

cd ComfyUI/custom_nodes/
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt   # includes google-genai>=1.0.0

or install pip install google-genai into your ComfyUI environment directly, then restart. ComfyUI Manager's "search ArchAi3d Qwen" route handles it all too.

Where people get burned

Missing node = missing SDK, most of the time. If the node never appears after install, check that google-genai actually landed in the right Python environment. Second: this is a paid API - every run costs money, and use_cache off means every run costs money. There's a free tier, but a batch workflow re-querying on each iteration will surprise you on the bill. And remember thinking_budget isn't supported by every model in the list; models that don't do reasoning ignore it or error, so keep it at 0 unless you're on a 2.5/3.x model and actually need the reasoning.

CategoryArchAi3d/Edit/VLM

Inputs (17)

NameTypeDefaultDescription
nameSTRINGgemini_promptIdentifier name for this input (used by web interface)
promptSTRINGDescribe this image in detail.The prompt to send to Gemini
modelCOMBOgemini-2.5-flashSelect Gemini model (can be overridden by model_override)
model_overrideoptSTRINGConnect ArchAi3D Gemini Model node here to override model selection
system_promptoptSTRINGSystem instructions to guide model behavior
api_keyoptSTRINGAPI key (saved to config after first use)
image1optIMAGEβ€”
image2optIMAGEβ€”
image3optIMAGEβ€”
image4optIMAGEβ€”
temperatureoptFLOAT1.000–2Temperature (0=deterministic, 1=balanced, 2=creative)
top_poptFLOAT0.950–1Top-p nucleus sampling (0.95 recommended)
top_koptINT401–100Top-k token selection
max_tokensoptINT81921–65536Maximum output tokens
seedoptINT00–2147483647Random seed for reproducibility (0 = random)
thinking_budgetoptINT00–24576Thinking token budget for Gemini 2.5/3 models (0=off, 1024-24576=on). Model uses these tokens to reason before responding.
use_cacheoptBOOLEANtrueUse cached response if inputs haven't changed (saves API calls)

Outputs (1)

NameTypeDescription
responseSTRINGβ€”