ComfyUI Node

qwen_VL_model

Ask Qwen3-VL about your own renders — image captioning, inside ComfyUI

By ConstantlyGrowup·Created 8 months ago·Updated 8 months ago· 3
qwen_VL_model
  • image
  • STRING
text
modelQwen3-VL-4B-Instruct
quantization
temperature0.70
max_new_tokens512
seed-1
video_path
model_loaded_permanentlyfalse
offload_after_usedfalse

qwen_VL_model is the multimodal sibling in the Qwen pack: it takes an actual IMAGE into the node and returns text about it. Same setup as qwen_chat_model - local weights, no API key, no cloud - but the model is a vision-language one (Qwen2.5-VL or Qwen3-VL), so the "input" is an image and a question, and the "output" is the model talking about what it sees.

This is the node you reach for when you want an image to write its own prompt. Feed in a reference render and have the model describe it back as a structured prompt for your image model - the classic prompt-from-reference loop, all inside the graph. It's also the workhorse for captioning: auto-tag a batch of images before LoRA training, or just sanity-check a render by asking "what's wrong with this image" and letting it critique your work. Vision-language prompting on the same family of models that encode your diffusion prompts tends to produce captions that actually match the style of prompt those models want.

How it works

Under the hood it loads a Qwen2_5_VLForConditionalGeneration or Qwen3VLForConditionalGeneration checkpoint from Hugging Face, device_map="auto", bf16 on CUDA, with the AutoProcessor and qwen-vl-utils handling the vision inputs. Your text becomes the user message and the image is inserted as the image content of that message. The node takes the first frame of whatever IMAGE you hand it (batch index 0), so a 4-image batch means it looks at the first one - keep that in mind.

The inputs that matter

  • text - your question or instruction: "describe this in detail", "write a prompt that would recreate this image", "list the flaws".
  • model - ten choices from 2B to 32B, in Thinking and Instruct flavors. Default is Qwen3-VL-4B-Instruct, a good balance; the 32B options are workstation territory even at 4-bit, and thinking variants reason out loud before answering (slower, wordier).
  • image (optional) - the IMAGE you want it to look at.
  • quantization - none / 4bit / 8bit. Vision models eat VRAM fast; 4bit is your friend for anything above the 4B class.
  • temperature, max_new_tokens (512), seed (-1 = don't set).
  • video_path - reserved in the README, currently not used by the implementation. Don't expect video input to work yet.
  • model_loaded_permanently / offload_after_used - pin the model in cache, or unload and free VRAM after each run. Both off by default; the shared cache keeps the last two models loaded and evicts the least-recently-used beyond that (tunable via QWEN_MAX_LOADED_MODELS).

The single output is a STRING - the model's answer - which feeds anything that takes text.

Installing it

Same pack as the text-only node, so the install is identical. ComfyUI Manager should find "ComfyUI CALL LOCAL Qwen Chat Models", or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ConstantlyGrowup/ComfyUI_Qwen_chat_models.git
cd ComfyUI_Qwen_chat_models
pip install -r requirements.txt

Restart and you'll find both nodes under Comfyui_Qwen. The requirements are the full transformers stack - transformers, accelerate, bitsandbytes, qwen-vl-utils, optimum - and qwen-vl-utils is genuinely needed here, since it's what processes the image. First use downloads the checkpoint into ComfyUI/models/LLM/<model_name>/ automatically; that can be a long first run.

Common issues

  • First run is slow - the model is downloading (VL checkpoints are big; 7B+ is multiple GB). Pre-download into ComfyUI/models/LLM/<model_name>/ to skip the wait.
  • CUDA OOM - vision models are hungry. Turn on offload_after_used, pick a smaller checkpoint, or drop to 4-bit quantization.
  • 4bit/8bit won't load - bitsandbytes/CUDA mismatch. Set quantization to none and fall back to a smaller model.
  • Cannot load pinned model - you've pinned more than QWEN_MAX_LOADED_MODELS (default 2) models. Unpin some or raise the env var.
  • It ignores your video_path - expected, it's reserved for now.

It's a small, low-profile pack from a minor author, and local-LLM nodes are one of the ecosystem's known malware vectors (the LLMVISION incident taught everyone that lesson). Install from the official repo and you're fine. What you get is an honest, fully local image-to-text node - worth having if you caption or prompt-from-reference at all.

CategoryComfyui_Qwen

Inputs (10)

NameTypeDefaultDescription
textSTRING
modelCOMBOQwen3-VL-4B-Instruct10 options: Qwen2.5-VL-3B-Instruct, Qwen2.5-VL-7B-Instruct, Qwen3-VL-2B-Thinking, Qwen3-VL-2B-Instruct, Qwen3-VL-4B-Thinking, Qwen3-VL-4B-Instruct, +4
quantizationCOMBO3 options: none, 4bit, 8bit
temperatureFLOAT0.70
max_new_tokensINT512
seedINT-1
imageoptIMAGE
video_pathoptSTRING
model_loaded_permanentlyoptBOOLEANfalse
offload_after_usedoptBOOLEANfalse

Outputs (1)

NameTypeDescription
STRINGSTRING