ModelScope-Vision 图生文节点
Vision LLMs in your graph, without the VRAM hit
- image
- description
This is the node you reach for when you want an actual vision model - not a WD14 tagger's probability list - to look at an image and tell you what's going on. Feed it a frame, get back a natural-language description as a STRING you can wire straight into a prompt field. Reverse-prompting, captioning frames for a LoRA dataset, or "what exactly is wrong with this render" checks all work here, and none of them cost you a single GB of VRAM, because the model runs on ModelScope's hosted inference, not your machine.
How it works
That's the whole pitch of this pack: every node in it is a thin client for Alibaba's ModelScope cloud (魔搭, the Chinese HuggingFace-plus-hosting). This particular node talks to an OpenAI-compatible chat completions endpoint at api-inference.modelscope.cn/v1. Your image gets converted to a base64 data URL, dropped into a chat.completions request as an image_url, and the answer comes back as text. It's the exact same API shape as calling Qwen-VL through any OpenAI-SDK wrapper, which is also why the node quietly demands the openai package - if it's missing, the node renders as a placeholder that just tells you to pip install openai.
The inputs that matter
The inputs that matter, in order of how often you'll touch them:
- image (required) - the frame to analyze. Any
IMAGEoutput in your graph. - prompt (required, multiline) - what you want said about it. Default is "A beautiful landscape", which is a weird default for an analysis node; change it to "describe everything in this image, including text and layout" and you'll get far better reverse-prompt material.
- api_token (required) - your ModelScope token. Grab one from modelscope.cn → your profile → Access Token. Good news: type it once and it auto-saves to the pack's
modelscope_config.json, so later runs can leave the field blank. - model - default
stepfun-ai/step3, a StepFun reasoning VL model. The dropdown also has Qwen2.5-VL in 3B/7B/32B/72B, Qwen2-VL-7B, Qwen/QVQ-72B-Preview, and ERNIE-4.5-VL. The bigger the model, the better the analysis and the slower/costlier the call. QVQ-72B is the one to reach for when you need actual reasoning about an image, not just a caption. - max_tokens (100–4000, default 1000) and temperature (0.1–2.0, default 0.7) - normal LLM knobs. Bump max_tokens if descriptions keep getting cut off.
Output is a single description STRING. Wire it into a positive prompt, a text node, or a preview node.
Installing it
Installing is the standard pack dance. Via ComfyUI Manager, search "ComfyUI ModelScope API Node" and hit install. Or, by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/hujuying/ComfyUI-ModelScope-API
Then restart ComfyUI. The openai package is the only real extra dependency - requests, Pillow, torch, and numpy all ship with ComfyUI already.
Gotchas
Two honest gotchas. First, this is a paid-ish cloud call per image: you're renting someone else's GPU by the token, and it's a network round trip, so don't drop a 500-frame batch through it and walk away. Second, when the API errors, the node returns the error as the description string instead of throwing - you'll see "图像分析失败: …" as output text and a fuller trace in your terminal. If a description looks like a bug report, it is one; read the console.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | A beautiful landscape | — |
| api_token | STRING | — | |
| modelopt | COMBO | stepfun-ai/step3 | 8 options: stepfun-ai/step3, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen2.5-VL-72B-Instruct, Qwen/Qwen2.5-VL-3B-Instruct, Qwen/Qwen2.5-VL-32B-Instruct, Qwen/Qwen2-VL-7B-Instruct, +2 |
| max_tokensopt | INT | 1000100–4000 | — |
| temperatureopt | FLOAT | 0.70.1–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| description | STRING | — |