Qwen-VL Caption
Turn any image into a detailed caption, entirely offline
- model
- image
- caption
"Describe this image in detail." is the whole node, really. Qwen-VL Caption hands an image to a local Qwen-VL (or Qwen3-VL) model and gets back a text caption - no API, no key, no internet. It's the final stop in this pack's three-node chain: Model Loader → (optionally) LoRA Loader → Caption → ShowText, and it's what makes the other two nodes worth having.
Why reach for it? The same reason half of r/comfyui is running Qwen3-VL these days: captioning is the boring, load-bearing job in every modern workflow. Caption your training set before you train a LoRA. Reverse-engineer an image into a prompt, then feed that string into an image model that loves long detailed prompts (Z-Image famously pairs with Qwen-generated captions - same vocabulary family, and people report it "understands" them better). Or just auto-tag a folder of images. A vision-language model like Qwen3-VL-8B is the current sweet spot: 8B and up gives description quality that keeps up with the 32B models for this kind of work, at a size you can actually run.
How it works
The node takes a standard ComfyUI IMAGE tensor, converts the first frame to a PIL image, and builds the same chat-style message you'd send through the Qwen API: the image plus your text prompt. It runs the processor's chat template, calls generate(), and decodes just the newly generated tokens back into a string. Nothing exotic - which is the point. It's Hugging Face transformers doing standard vision-language inference inside a node.
The output is a plain STRING named caption, so it wires straight into anything that eats text. It's also an output node, so the result shows in its own widget in the UI and prints to the ComfyUI console - handy when you're captioning in a loop and don't want to fish text out of a ShowText node.
The inputs that matter
prompt- the instruction the model follows. Default is "Describe this image in detail." You'll want to tune this: "List the objects, lighting, and composition" for dataset captions, or "Write a detailed prompt suitable for image generation" when you're building prompts for another model. It's multiline, so you can write a proper system-style instruction.max_new_tokens- 64 to 2048, default 512. This is the generation budget, not a max caption length. Detailed descriptions eat tokens fast; if your captions keep getting cut off mid-sentence, raise it. 512 is a reasonable starting point, and the step size of 64 stops you from overthinking it.model- theQWENVL_MODELfrom the pack's loader (or its LoRA loader). No model loader, no caption; there's no bundled model.image- a normalIMAGEtensor from Load Image or anywhere else in your graph.
Installing it
Install the whole pack once - all three nodes come together:
cd ComfyUI/custom_nodes
git clone https://github.com/Dangocan/comfyui_qwenvl_lora
cd comfyui_qwenvl_lora
pip install -r requirements.txt
Or just search "ComfyUI Qwen-VL LoRA" in ComfyUI Manager. Dependencies are light for an LLM node: peft and transformers. The heavy part is the model itself - drop a Qwen-VL/Qwen3-VL checkpoint folder into models/LLM/Qwen-VL/ (or a folder registered under text_encoders in extra_model_paths.yaml), restart ComfyUI, and it appears in the loader's dropdown.
Where people get burned
First, this captions one image per run - it reads image[0] and ignores the rest of the batch. A batch of 20 images gives you one caption. Feed them one at a time.
Second, VRAM is the real constraint, and it's set by the loader, not this node. If you loaded the model in FP16 and you're on a 8 GB card, captions will crawl or OOM. This is where the loader's 4-bit quantization earns its keep.
Third, a pruned text encoder won't work here. The folder you point the loader at needs to be a full Qwen-VL checkpoint, not the pruned encoder that an image model like Z-Image ships with - a stripped encoder can't run the generation loop. If your dropdown is empty, that's almost always the reason: no config.json, no node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | QWENVL_MODEL | — | |
| image | IMAGE | — | |
| prompt | STRING | Describe this image in detail. | — |
| max_new_tokens | INT | 51264–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| caption | STRING | — |