Nodes/ComfyUI-Qwen-VL-API/㊙️QWenVL_Zho
ComfyUI Node

㊙️QWenVL_Zho

This single-turn captioner just needs a DashScope key

By ZHO-ZHO-ZHO·Created 3 years ago·Updated 2 years ago· 219
㊙️QWenVL_Zho
  • image
  • text
promptDescribe this image
model_name
seed0

The easiest Qwen-VL you'll ever run (if you already have a key)

㊙️QWenVL_Zho is Alibaba's Qwen-VL vision-language model, called as a cloud API from inside ComfyUI. No model files, no GPU for the VLM, no huggingface download screen - just an image in, text out. It's one of the earliest of ZHO-ZHO-ZHO's API wrappers (this pack dates to January 2024), and it still works if you have a DashScope API key.

When would you reach for it? Classic interrogation duty: describe a reference image, turn a render into a prompt, generate tags for a LoRA dataset, sanity-check what's actually in a frame. The text output feeds straight into a prompt encoder or any text display node. These days most people run Qwen-VL locally through a GGUF node, but this is the zero-download path - useful when your GPU is already busy with the diffusion part and you don't want to load a vision model on top of it.

How it works

The node reads your QWENVL_API_KEY from config.json in the pack's folder, converts the incoming IMAGE tensor to a PIL image, saves it to a temp file, and builds a DashScope MultiModalConversation message pairing a file:// URL with your prompt. It calls the API, pulls the text out of output.choices[0].message.content[0].text, then deletes the temp image. Single-turn: there's no conversation memory, so every run is a fresh description of whatever image is connected. The seed is passed through to the API, but take determinism with salt - server-side sampling doesn't give you the same reproducibility you get from a local sampler.

The inputs that matter

There are only four, and you'll touch all of them:

  • image - any IMAGE from your graph (Load Image, a VAE-decoded batch, whatever)
  • prompt - multiline string, defaults to "Describe this image". This is where you steer the model
  • model_name - qwen-vl-plus (better detail and OCR) or qwen-vl-max (better reasoning and instruction-following)
  • seed - an integer, passed to the API

The single output, text, is a STRING with the model's answer. Wire it into a text display node or any node that accepts text - it won't give you a mask or an edited image, just words.

Installing it

The README recommends ComfyUI Manager, but this old pack may not be in the registry search reliably, so the manual route is the honest one:

cd ComfyUI/custom_nodes
git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-Qwen-VL-API
cd ComfyUI-Qwen-VL-API
pip install -r requirements.txt

Then restart ComfyUI. requirements.txt contains a single dependency: dashscope. There are no model downloads - the whole point is that the heavy lifting happens on Alibaba's servers.

Now the part that trips everyone: you need a DashScope API key from Alibaba Cloud. On first launch the pack creates config.json with a "your key" placeholder - open it and paste your real key:

{
  "QWENVL_API_KEY": "sk-xxxxxxxx"
}

Where people get burned

  • "API key is required" - the key isn't in config.json, or the file is still the placeholder. The error message prints in Chinese ("出错啦") which is confusing if you're not expecting it.
  • The README says the API is free. That was true for about six weeks in early 2024; DashScope started charging on March 18, 2024. It's a paid API now, and the README hasn't caught up. Check current pricing before building a workflow around it.
  • No error handling in the code. A bad key, an expired one, or a network failure can throw an unhandled error rather than a friendly message. If the node dies with something cryptic, the first suspect is the key or your DashScope balance.

It's a simple, single-purpose node from an era when "VLM in ComfyUI" meant "call a cloud API." If you already live on DashScope it's a nice zero-friction captioner. If you're starting from zero, you'll pay for the key and the calls - at that point a local Qwen-VL GGUF node starts looking very attractive.

CategoryZho模块组/💫QWenVL

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGDescribe this image
model_nameCOMBO2 options: qwen-vl-plus, qwen-vl-max
seedINT00–18446744073709550000

Outputs (1)

NameTypeDescription
textSTRING