Gemini视觉丨API
Gemini's vision in your graph — with a thinking knob for 2.5 models
- image
- analysis_result
- conversation_info
- total_tokens
If you want Google's vision models inside ComfyUI without messing with the official node ecosystem, GeminiVisionAPI is the QING pack's door in. It sends an image and a question to Google's Gemini API and returns the analysis as text. The 2.5-series models get a reasoning_effort knob - none/low/medium/high - which is the thinking-depth control for the flash and pro models, and the one thing that separates this from a dumb image-to-text call. Feed it a frame from your video workflow and ask "describe the composition," and the answer comes back ready to steer your next prompt.
It's part of ComfyUI-QING's API category, platform fixed to Google AI Studio (no dropdown to confuse). The model field lists six Gemini options from gemini-2.0-flash up through gemini-2.5-pro, with gemini-2.5-flash-lite as the default - the lightweight one, which is the sensible default for caption-and-move-on jobs.
How it works. The image and your text_input go to Google's Gemini endpoint using the key you configured in the QING settings panel. The framework handles the multi-turn history (default 6 rounds) and token limits. The interesting bit is reasoning_effort: for the 2.5 series this controls how much the model "thinks" before answering - none is fast and direct, high burns tokens but gets you deeper visual reasoning. The tooltip is explicit that this is a 2.5-series-only feature, so it's a no-op on gemini-2.0-flash.
The inputs that matter.
image- what you're analyzing.text_input- your question (default "describe this image").model- six choices;gemini-2.5-flash-litedefault.max_tokens(default 4096) andhistory(default 6 rounds).- Optional:
temperature(default 0.4 - low, for consistent analysis),top_p,image_quality,reasoning_effort(default none),clear_history.
Outputs: analysis_result, conversation_info, total_tokens.
How to install. ComfyUI-QING is a one-pack install - search "ComfyUI-QING" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GAO-SHIQING/ComfyUI-QING
cd ComfyUI-QING
python install_dependencies.py
Set your Google AI Studio key in Settings → QING → API Configuration and restart. The README's clone URL is typo'd (GAOSHI-QING, missing the H) - use the URL above or Manager.
Troubleshooting. The reasoning-effort gotcha: it only does anything on 2.5-series models, so cranking it to high on gemini-2.0-flash silently changes nothing while you wait longer for nothing. Second: Gemini 2.5 models can be slow, and "high" reasoning plus a big image plus max_tokens 32768 is a recipe for a timeout - drop the reasoning effort or the token cap if calls are timing out. Third, your key lives in the QING settings panel, so a fresh install that never opened Settings → QING will fail auth until you add it. And as with every API node here: your image and prompt leave the machine, and Google's content policy applies to whatever you ask about.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | 输入要分析的图像 | |
| text_input | STRING | 请描述这张图片的内容。 | 输入要发送给Gemini视觉模型的文本问题,Gemini擅长图像理解、多模态推理、代码生成和复杂视觉分析 |
| platform | COMBO | Google AI Studio | 选择API服务提供商 |
| model | COMBO | gemini-2.5-flash-lite | 选择要使用的Gemini视觉模型 📋 Google AI Studio模型特点: 🔸 gemini-2.5-pro:最新专业版,最强性能和思考能力 🔸 gemini-2.5-flash-preview-09-2025:2025年9月预览版Flash模型,最新特性 🔸 gemini-2.5-flash-lite-preview-09-2025:2025年9月预览版轻量模型,快速响应 🔸 gemini-2.5-flash:最新Flash模型,速度和质量平衡 🔸 gemini-2.5-flash-lite:轻量版2.5模型,快速响应 (默认推荐) 🔸 gemini-2.0-flash:新一代Flash模型,性能提升 💡 Gemini在多模态理解、代码识别、图表分析、创意生成方面表现优异 💭 2.5系列支持深度思考功能,可设置推理努力级别 📖 参考文档:https://ai.google.dev/gemini-api/docs/openai |
| max_tokens | INT | 40961–32768 | 模型生成文本时最多能使用的token数量 |
| history | INT | 61–25 | 保持的历史对话轮数 |
| temperatureopt | FLOAT | 0.40–2 | 控制生成文本的随机性 |
| top_popt | FLOAT | 0.950–1 | 控制生成文本的多样性 |
| image_qualityopt | COMBO | auto | 图像处理质量:auto(自动选择), low(低质量,速度快), high(高质量,精度高) |
| reasoning_effortopt | COMBO | none | 推理深度:none(关闭), low(轻度思考), medium(中度思考), high(深度思考) - Gemini 2.5系列特有功能 |
| clear_historyopt | BOOLEAN | false | 是否清除历史对话记录 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| analysis_result | STRING | — |
| conversation_info | STRING | — |
| total_tokens | INT | — |