Gemini Chat
Gemini in your graph — with thinking on, and vision on demand
- image
- text
- raw_response
This is the pack's most configurable chat node: it talks to Google's Gemini models, supports an optional image input for vision questions, and - the feature that sets it apart - can turn on the model's thinking mode with a configurable budget. You get text and raw_response out, which is enough to drive prompt generation, image analysis, or workflow decision-making from inside the graph.
There's one thing to read carefully before you use it, because it's the kind of detail that costs people an hour: the host field. The node builds its request as https://<host>/v1beta/models/<model>:generateContent - that's the standard Gemini API shape - but if you leave host empty, the code falls back to millionengine.com. That's a third-party relay host, not Google's official endpoint. If you want to talk to Google directly, you set host to the actual API host yourself (e.g. generativelanguage.googleapis.com). Going through the default relay means your traffic and API key go through that intermediary, so decide deliberately whether that's acceptable.
How it works
You give it a model name (default gemini-2.5-pro if left empty), an api_key, a system_instruction, and user_input. The optional image input gets encoded inline as PNG and sent with your text - so you can ask Gemini to describe or caption a generated image, or reason about it, without any file handling.
The thinking controls are the interesting part:
- include_thoughts - default on; adds the
thinkingConfigblock so the model reasons before answering. - thinking_budget - how many tokens the model may spend thinking, from 1024 up to 131072, default 26240. Lower it for speed, raise it for harder questions.
Outputs are text (the reply, stitched together from the response parts) and raw_response (the full payload). Sampling controls are the standard temperature (0–2) and top_p (0–1).
Install
Part of ComfyUI-WBLESS:
cd ComfyUI/custom_nodes
git clone https://github.com/LaoMaoBoss/ComfyUI-WBLESS
restart ComfyUI, or search "ComfyUI-WBLESS" in ComfyUI Manager. No models, no dependencies - but you need a Gemini API key and internet.
Troubleshooting
Start with host. If you're getting auth or "model not found" errors against the default relay, decide whether you meant to use it at all - switching to the official Google host (or the relay you actually have a key for) fixes most of them. Model names are host-specific: gemini-2.5-pro is a safe default, but whatever the host serves is what works. If replies seem to vanish, include_thoughts on a model that doesn't support thinking can produce empty content - try toggling it off. And with thinking_budget at 26240, expect noticeably slower, pricier responses; drop it for fast, cheap Q&A. It's a powerful node when the plumbing is right - just know which host you're talking to.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| host | STRING | — | |
| api_key | STRING | — | |
| model | STRING | — | |
| system_instruction | STRING | — | |
| user_input | STRING | — | |
| temperature | FLOAT | 1.00–2 | — |
| top_p | FLOAT | 1.000–1 | — |
| include_thoughts | BOOLEAN | true | — |
| thinking_budget | INT | 262401024–131072 | — |
| imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_response | STRING | — |