Gemini 1.5 视觉
Turn any image into a detailed prompt with Gemini 1.5 Flash
- image
- description
Gemini 1.5 Vision is the "describe this picture" node, and its default prompt tells you exactly what it's for: "分析这张图片并生成一个详细的文本到图像提示。不要加前缀!" - analyze the image and generate a detailed text-to-image prompt, no prefix. This is reverse-prompting: you have an image you like (or a reference you can't keep), and you want the model to write the prompt that could recreate it, so you can feed that into your SDXL or Flux workflow and iterate.
Mechanically it converts the incoming IMAGE tensor to a PIL image, sends it to gemini-1.5-flash alongside your prompt, and returns the model's text as a STRING named description. It shares the base class with the pack's Gemini Text node, so it gets the same retry wrapper and the same proxy-stripping nicety. The seed input is a bit of a costume - it seeds Python's random and torch's RNG before the call, but a cloud API isn't deterministic, so don't expect reproducible results from it.
The inputs that matter: prompt (multiline; the default Chinese instruction is good, but you can ask for "just the tags" or "a Flux-style sentence" instead), image (the IMAGE input), temperature, and max_tokens (default 1024, up to 2048).
Installing and keys
cd ComfyUI/custom_nodes
git clone https://github.com/yiwangsimple/ComfyUI_GroqChat
restart, then copy api_key.ini.example → api_key.ini and set GEMINI_API_KEY. Get one at aistudio.google.com if you don't have it.
Where it fits and where it trips
Like its text sibling, this node needs google-generativeai installed, and the pack's requirements.txt conveniently forgets to list it:
pip install google-generativeai
then restart. Once running, the honest comparison is against this pack's local vision options: dwimage2 (moondream2) runs offline but is much dumber, while Gemini Vision is smarter but cloud-only and rate-limited. For captioning reference images into reusable prompts, Gemini is the one you'll actually want. One workflow note: this returns a single combined description - if you want the split clip_L / clip_T5 Flux format instead, the pack's Gemini Flux Prompt node is the purpose-built version. This one is the generalist.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | 分析这张图片并生成一个详细的文本到图像提示。不要加前缀! | — |
| image | IMAGE | — | |
| temperature | FLOAT | 0.70–1 | — |
| max_tokens | INT | 10241–2048 | — |
| seedopt | INT | -1-1–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| description | STRING | — |