π€ Gemini API
Ask Gemini to describe your image, right inside the graph
- image1
- image2
- image3
- image4
- response
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.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | gemini_prompt | Identifier name for this input (used by web interface) |
| prompt | STRING | Describe this image in detail. | The prompt to send to Gemini |
| model | COMBO | gemini-2.5-flash | Select Gemini model (can be overridden by model_override) |
| model_overrideopt | STRING | Connect ArchAi3D Gemini Model node here to override model selection | |
| system_promptopt | STRING | System instructions to guide model behavior | |
| api_keyopt | STRING | API key (saved to config after first use) | |
| image1opt | IMAGE | β | |
| image2opt | IMAGE | β | |
| image3opt | IMAGE | β | |
| image4opt | IMAGE | β | |
| temperatureopt | FLOAT | 1.000β2 | Temperature (0=deterministic, 1=balanced, 2=creative) |
| top_popt | FLOAT | 0.950β1 | Top-p nucleus sampling (0.95 recommended) |
| top_kopt | INT | 401β100 | Top-k token selection |
| max_tokensopt | INT | 81921β65536 | Maximum output tokens |
| seedopt | INT | 00β2147483647 | Random seed for reproducibility (0 = random) |
| thinking_budgetopt | INT | 00β24576 | Thinking token budget for Gemini 2.5/3 models (0=off, 1024-24576=on). Model uses these tokens to reason before responding. |
| use_cacheopt | BOOLEAN | true | Use cached response if inputs haven't changed (saves API calls) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | β |