Nodes/ComfyUI-nkxx/👁️ GRSAI VLM (图文视觉对话)
ComfyUI Node

👁️ GRSAI VLM (图文视觉对话)

Gemini looks at your images and tells you what's there

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
👁️ GRSAI VLM (图文视觉对话)
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • response_text
  • error_msg
modelgemini-3.1-pro
promptDescribe these images.
random_mode固定
api_key

The vision half of the pack's LLM pair. Same Gemini models on the Grsai channel as GRSAILLMNode, but this one can see: feed it up to six images plus a text question ("describe these images", "what's the lighting like", "extract the color palette") and it returns a text answer. If you've ever wanted a captioner, an image-inspector, or a "turn this screenshot into a prompt" node that doesn't run a single megabyte locally, this is it.

Where it earns its keep in this pack specifically: the README's stated use-case is generating MJ/image-generation prompts from reference images - look at a picture, have Gemini write the prompt, pipe that string into a GrsaiNanoBanana or MJ node. It's the "closed model writes the prompt for another closed model" loop, and it works because both sides speak STRING.

The inputs that matter

  • model - gemini-3.1-pro (default), gemini-3-flash, gemini-3-pro, gemini-2.5-flash, gemini-2.5-flash-lite. The default is the newest pro - quality over speed here.
  • prompt (multiline, default "Describe these images.") - the instruction that defines the job. Being specific ("write a detailed prompt for this product shot") beats "describe this."
  • random_mode - 固定/随机, same cache-busting zero-width-char trick as the LLM node.
  • api_key (optional) - Grsai key fallback.
  • image_1image_6 (optional IMAGE) - the images being analyzed. Wire in DynamicImageList or an image batch.

Outputs: response_text (STRING) and error_msg (STRING).

How it works

Readable source. Connected images are converted to base64 JPEG data-URLs and sent as multimodal content blocks to /v1/chat/completions. Two details worth knowing: with no images attached it silently degrades to plain-text chat (handy), and each image tensor can carry multiple frames - every frame gets encoded and sent, so a batch of frames means a big payload and a longer call. The Gemini refusal/moderation policy applies, same as any hosted model.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx

restart (or ComfyUI Manager, "ComfyUI-nkxx"). Auto-installs requests, pandas, openpyxl, yt-dlp, opencv-python, aiohttp. Grsai key from nkxx.grsai.ai.

Common issues

  • "图片输入已连接但处理失败" (images connected but processing failed): an image tensor failed to encode - usually a corrupt input or an unusual format upstream. Re-load the image and retry.
  • Huge image batches time out: many frames → many base64 JPEGs → slow. The node's own timeout is 60s; trim your batch or use image_1 only for the big jobs.
  • Filtering: Gemini refuses at the source. A captioner that runs on a hosted model is exactly the shape the KB flags as the most security-sensitive install - this one at least has readable Grsai-side source, unlike the Wujiai nodes.
CategoryNkxx/Grsai/语言模型

Inputs (10)

NameTypeDefaultDescription
modelCOMBOgemini-3.1-pro5 options: gemini-3.1-pro, gemini-3-flash, gemini-3-pro, gemini-2.5-flash, gemini-2.5-flash-lite
promptSTRINGDescribe these images.
random_modeCOMBO固定2 options: 固定, 随机
api_keyoptSTRING
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE

Outputs (2)

NameTypeDescription
response_textSTRING
error_msgSTRING