🐟Gemini
Send an image to Google's Gemini API and get a text description back
- image
- STRING
Don't confuse this with an image-generation node - it doesn't make anything. It sends an image out to Google's Gemini API and gets a text description back, which makes it a captioning/vision-analysis node, not a Nano Banana-style generator. If you need auto-captions for a dataset, a quick "what's in this image" sanity check, or a description to feed into another prompt-building step downstream, this is what it's for.
How it works
You give it an image and your own Google API key, pick a Gemini model, and write a prompt telling it what you want described (defaults to the generic "Describe this image"). It converts the ComfyUI image to whatever format the API expects, sends the request, and returns Gemini's text response as a single STRING output.
The inputs and outputs that matter
image(IMAGE, required) - what you want analyzed.api_key(STRING, required) - your own Google API key, available from Google AI Studio. Without it the node has nothing to call.model- a dropdown of gemini-2.0-flash-exp, gemini-1.5-flash, gemini-1.5-flash-8b, and gemini-1.5-pro.prompt(STRING, default "Describe this image") - steer what kind of description you get; the README's own examples include "List all the objects in this image" for something more structured.temperature(FLOAT, 0–2, default 0.8) - lower for consistent, literal descriptions; higher for more varied phrasing.max_output_tokens(INT, 1–8192, default 2048) - caps response length.
Output: a single STRING - the model's text response, ready to wire into the pack's own FileSave or JsonUnpack nodes, or straight into a text-encode node if you're using the description as a prompt.
How to install it
Search ComfyUI-QHNodes in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/liuqianhonga/ComfyUI-QHNodes.git
Restart. Main-repo node, no models to download - but you do need a Google API key before it'll do anything, and the README is upfront that API calls can cost real money depending on your usage and Google's current pricing.
Common issues & troubleshooting
The model dropdown may be stale. This list - Gemini 1.5 and 2.0 Flash/Pro - reflects Google's lineup from when the node was written. Google's API model lineup moves fast; by the time you're reading this, Google has already moved well past the 1.5 series toward Gemini 3 and its "Nano Banana" image-generation line, and older model IDs do periodically get deprecated or retired on Google's end. If a selection in this dropdown starts returning errors, that's most likely Google discontinuing that specific model ID rather than anything wrong with the node itself - check Google's current model list against what you're selecting here.
"Invalid API key" or authentication errors. Straightforward but worth stating: this needs a real key from Google AI Studio, not a CivitAI or HuggingFace token - easy mix-up if you're jumping between this node and the pack's Download* nodes in the same session.
Slow responses on larger images. The README notes this plainly - bigger images take longer to process through the API. If you're batch-captioning a folder (this pairs naturally with the pack's LoadImageFromFolder), budget for per-image API latency rather than assuming it'll run at local-inference speed.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| api_key | STRING | — | |
| model | COMBO | gemini-2.0-flash-exp | 4 options: gemini-2.0-flash-exp, gemini-1.5-flash, gemini-1.5-flash-8b, gemini-1.5-pro |
| prompt | STRING | Describe this image | — |
| temperature | FLOAT | 0.80–2 | — |
| max_output_tokens | INT | 20481–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |