ComfyUI Node

QwenVL

Describe any image or video with Alibaba's vision model, right inside ComfyUI

By 1038lab·Created about a year ago·Updated 23 days ago· 824
QwenVL
  • image
  • video
  • RESPONSE
model_nameQwen3-VL-2B-Instruct
quantizationNone (FP16)
attention_modeauto
preset_prompt🖼️ Detailed Description
custom_prompt
max_tokens512
keep_model_loadedtrue
seed1

Feed it an image, get back a paragraph describing what's in it. That's the whole job, and Qwen-VL is unusually good at it. This node wraps Alibaba's Qwen3-VL and Qwen2.5-VL vision-language models so you can caption images, tag them, summarize a video, or turn a reference photo into a prompt - all without leaving your graph and without an API key. The models run locally on your own GPU.

Why you'd reach for it: captioning is the quiet workhorse of half the workflows people build. LoRA training needs captions. A "describe this then regenerate it" loop needs captions. The long-standing tools here are Florence-2 and JoyCaption for natural language, WD14 for booru tags - QwenVL is the newer, generally stronger option, and the r/comfyui crowd has taken to it fast (one poster called the 30B version "maybe a new best-in-class" for interpreting images). It writes in fluent natural language, which is exactly what the LLM-based text encoders behind Z-Image, Flux 2, and friends actually want to read.

How it works

Under the hood this is a real multimodal LLM. Your image gets encoded into visual tokens, stapled onto your text prompt, and the model generates a response the same way a chatbot would - it's genuinely "looking" and "answering," not matching against a fixed label set. That's why it handles open-ended requests ("what's the mood here?", "read the sign") that a classifier-style captioner can't. It's the standard, no-fuss node in the pack; the Advanced sibling exposes the sampling knobs, but for most captioning you don't need them.

The inputs that matter

  • model_name - 18 options spanning Qwen3-VL (2B / 4B / 8B / 32B, each in Instruct or Thinking, plus FP8 builds) and Qwen2.5-VL (3B / 7B). Start with a 4B Instruct - it's the sweet spot most people land on. Go bigger only if you have the VRAM and need the accuracy. "Thinking" variants reason before answering (slower, better on hard questions); "Instruct" is the default you want for plain captioning. Models download automatically from HuggingFace on first use.
  • preset_prompt - nine ready-made jobs: Tags, Simple/Detailed/Ultra Detailed Description, Cinematic Description, Detailed Analysis, Video Summary, Short Story, and Prompt Refine & Expand. Pick one and go.
  • custom_prompt - anything you type here overrides the preset. This is where you ask it a specific question.
  • quantization - 4-bit, 8-bit, or None (FP16). This shrinks the model on the fly to fit your card. FP16 is best quality if you've got the room; 8-bit is the balanced middle; 4-bit squeezes it onto a small GPU at some speed cost. (FP8 models are pre-quantized, so this setting is ignored for those.)

Connect an image (or a batch of frames to the video input) and the single output, RESPONSE (a STRING), carries the generated text. Wire it into a text encoder, a Show Text node, a caption-saving node, or whatever consumes it downstream. keep_model_loaded (on by default) keeps the weights in VRAM so the second run isn't another cold load, and seed makes a given output reproducible.

How to install it

ComfyUI Manager: search ComfyUI-QwenVL, install, restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/1038lab/ComfyUI-QwenVL.git
cd ComfyUI-QwenVL
pip install -r requirements.txt

Then restart ComfyUI. First run of any model pulls several GB from HuggingFace into ComfyUI/models/LLM/Qwen-VL/, so the first execution is slow - that's the download, not a hang.

Common issues

The one that bites hardest is VRAM. A real report: on an RTX 4080 Super, the 4B Instruct FP8 model ran fine, but switching to anything larger froze the workflow outright. If your run stalls or the console shows an out-of-memory error, drop to a smaller model or a lower quantization (8-bit, then 4-bit) before blaming the node. A 4B model in 8-bit is a comfortable target for most consumer cards.

Second, first-download failures. If you hit a 401 pulling a model, that's usually a stale HuggingFace token cached on your machine, not a locked repo - these are public weights. Clear the cached token (delete ~/.cache/huggingface/token, unset HF_TOKEN) and re-run. Finally, if you set attention_mode to flash_attention_2 or sage and it errors, switch to sdpa - it's the universal-compatibility fallback and not every build has flash-attn or SageAttention installed.

Category🧪AILab/QwenVL

Inputs (10)

NameTypeDefaultDescription
model_nameCOMBOQwen3-VL-2B-InstructPick the Qwen-VL checkpoint. First run downloads weights into models/LLM/Qwen-VL, so leave disk space.
quantizationCOMBONone (FP16)Precision vs VRAM. FP16 gives the best quality if memory allows; 8-bit suits 8–16 GB GPUs; 4-bit fits 6 GB or lower but is slower.
attention_modeCOMBOautoauto tries flash-attn v2 when installed and falls back to SDPA. Only override when debugging attention backends.
preset_promptCOMBO🖼️ Detailed DescriptionBuilt-in instruction describing how Qwen-VL should analyze the media input.
custom_promptSTRINGOptional override—when filled it completely replaces the preset template.
max_tokensINT51264–2048Maximum number of new tokens to decode. Larger values yield longer answers but consume more time and memory.
keep_model_loadedBOOLEANtrueKeeps the model resident in VRAM/RAM after the run so the next prompt skips loading.
seedINT11–4294967295Seed controlling sampling and frame picking; reuse it to reproduce results.
imageoptIMAGE
videooptIMAGE

Outputs (1)

NameTypeDescription
RESPONSESTRING