ModelScope VLM
Ask an image a question — ModelScope VLM reads pictures from inside ComfyUI
- response
You've generated an image and now you want to know if it's actually what you asked for. That's the job ModelScope VLM was built for: hand it a picture and a question, and it returns a text answer. It's a vision-language model running on Alibaba's ModelScope cloud - no local model, no GPU, just an API key and a URL. Think of it as a free-ish second opinion sitting inside your graph, telling you whether that hand you generated is still five fingers.
Where it earns its keep: auto-captioning a batch of outputs, checking a LoRA result against the prompt for character consistency, or acting as a judge in a workflow that scores its own generations. The Qwen family this rides on is the same Apache 2.0 line that's all over the local ecosystem, so the model quality is no surprise - the only surprise is how easy it is to wire in.
How it works
It's the same OpenAI-compatible chat endpoint as the pack's LLM node (/v1/chat/completions), with one difference: the user message carries an image_url content part alongside the text, the standard vision-API format. The default model is Qwen/QVQ-72B-Preview, Alibaba's vision-reasoning model - though enable_thinking is hard-coded off, so you get the final answer without the reasoning trace. The reply is extracted, sanitized, and returned as a STRING.
The input that will annoy you
- image_url (required) - the whole catch of this node: the image must be a publicly accessible HTTP/HTTPS URL. You can't feed it the
IMAGEtensor already sitting in your graph, and a local file path is rejected outright (the node's own validation: "Image URL must be a valid HTTP/HTTPS URL"). If your image isn't already hosted, you'll be uploading it to imgur, catbox, or your own server before asking the question. That's the single biggest friction point, and it's by design - the cloud needs to fetch it itself.
The rest is familiar:
- prompt (required) - the question or instruction about the image.
- model_id (required) - default
Qwen/QVQ-72B-Preview; swap in any vision model ModelScope serves. - system_prompt (optional) - sets the assistant's behavior; there's a default.
- request_timeout - default 120 seconds, up to 300. The tooltip's honest: VLM inference is slow, keep it at 120+.
- api_key - empty means it reads
MODELSCOPE_API_KEYorMODELSCOPE_ACCESS_TOKEN.
Output is a single response (STRING), so it goes to ShowText|pysssss (the pack's example workflow does exactly that) or anywhere text flows.
Install
ComfyUI Manager, search "ComfyUI-ModelScope", or:
cd ComfyUI/custom_nodes
git clone https://github.com/neverbiasu/ComfyUI-ModelScope.git
Restart ComfyUI. No pip installs needed - requirements.txt is empty and the node only needs requests, which ComfyUI already bundles. The only thing you must supply is a ModelScope API key from modelscope.cn:
export MODELSCOPE_API_KEY="your-key-here"
Or paste it into the node's api_key field.
Common issues
- "Image URL must be a valid HTTP/HTTPS URL" - you fed it a file path, or a URL it doesn't like. It must be public and reachable from Alibaba's servers, so localhost and private IPs are out.
- Timeout - default 120s is generous but a busy reasoning model can still blow past it. Raise
request_timeout, or use a smaller vision model. - 401 / wrong model - bad key, or the
model_idisn't a chat-capable vision model. Check the model's ModelScope page. - Empty response - usually the model is still loading on the cloud side; retry.
The URL-only input is genuinely annoying if you work fully offline - for that crowd a local Qwen2.5-VL via GGUF is the answer, and this node isn't it. But if you're already in a cloud-API workflow, it's the quickest way to give your graph eyes.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model_id | STRING | Qwen/QVQ-72B-Preview | ModelScope VLM model ID. |
| image_url | STRING | URL of the image to analyze. Must be publicly accessible. | |
| prompt | STRING | Question or instruction about the image. | |
| system_promptopt | STRING | Optional system prompt to guide the assistant's behavior. | |
| api_keyopt | STRING | ModelScope API key. If empty, reads MODELSCOPE_API_KEY or MODELSCOPE_ACCESS_TOKEN from environment. | |
| request_timeoutopt | INT | 12030–300 | Request timeout in seconds. VLM inference can be slow, recommend 120+ seconds. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | VLM response describing or answering about the image. |