Qwen2.5 VL Caption (Inverse Prompt)
Qwen2.5 VL captioning without the API — using the model you already own
- image
- text
This is the node that started the pack, and it's the one with the least-sung superpower: it can run on a model file you almost certainly already have on disk. Qwen2.5 VL Caption (Inverse Prompt) takes an image, runs Qwen2.5-VL on it locally, and returns a text-to-image prompt describing it. No API key, no cloud, no per-image cost. And because the pack reads models from ComfyUI's text_encoders folder - the same place ComfyUI's own Qwen Image/Edit model lives - you may be one config file away from using this with zero new downloads.
If you use ComfyUI's Qwen Image/Edit at all, you've got qwen_2.5_vl_7b.safetensors in ComfyUI/models/text_encoders. The README's recipe: create a subfolder there, rename that file to model.safetensors, add the config files from Qwen/Qwen2.5-VL-7B-Instruct on Hugging Face, and this node sees it. The original model keeps working for its own use; you're just pointing two tools at one file. That's the whole pitch, and it's why a lot of people install the pack in the first place.
How it works
The mechanism is the same local generation as the newer Qwen nodes but with the 2.5-generation stack: Qwen2_5_VLForConditionalGeneration from transformers, an image resized to max_side, and the pack's prompt-inversion instruction (or your own via instruction). Generation runs up to 1024 new tokens and the node returns the cleaned-up text. It respects the 28-pixel tile factor of Qwen2.5, which is why max_side defaults to 532 and steps in 28s. On the 7B model in 4bit, this runs fine on 6-8GB cards - it's the lightest reliable caption path in the pack.
One difference from its Qwen3 sibling: the image input here is required, and there's no seed, no unload_other_models, and no video handling. It's deliberately the simple node - a single image in, a STRING out. If you need video, multi-image, or the bbox extras, the Qwen3 nodes are where the pack put those.
The inputs that matter
- image - the image to caption. This is the only real input; wire it from a LoadImage or anywhere else in your graph.
- model_path - dropdown over
text_encoders. Empty until the model is in place. - lang -
中文,English, orbbox. The bbox mode returns normalized bounding-box coordinates (0–1000 scale) for objects, meant to feed the pack'sStringToBboxnodes for grounded editing. - dtype -
auto/4bit/8bit. 4bit is the recommended default for the 7B on most consumer cards. - keep_model_loaded - True if you're captioning several images in a row.
- max_side - long-edge pre-scale. 532 is the safe default.
- instruction - optional override; leave blank to use the built-in prompt per language.
Output: a single text STRING with the caption/prompt.
Install and model setup
ComfyUI Manager (search "ComfyUI_QwenVL_PromptCaption") or:
cd ComfyUI/custom_nodes
git clone https://github.com/WingeD123/ComfyUI_QwenVL_PromptCaption
then restart. Dependencies: transformers>=5.2.0, accelerate, peft, bitsandbytes. Then the model - either the reuse trick above or a full Qwen2.5-VL-7B-Instruct folder dropped into text_encoders.
Troubleshooting
The classic failure is "Failed to load model" after the reuse trick - that almost always means the subfolder is missing config files (config.json, preprocessor_config.json, the tokenizer files). The README says to add them and people skip it; don't. A "no image" return means the input tensor was empty, which happens if you wired the node before an image was loaded. And expect captions from the 2.5 generation to be a notch below Qwen3-VL on fine detail - small text and cluttered scenes are where it shows. If quality is the priority, the pack's Qwen3 nodes are the upgrade path; if "it's already on my disk" is the priority, this is the node.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_path | COMBO | 0 options: | |
| lang | COMBO | 中文 | 3 options: 中文, English, bbox |
| dtype | COMBO | auto | 3 options: auto, 4bit, 8bit |
| keep_model_loaded | BOOLEAN | false | — |
| max_side | INT | 532252–2240 | — |
| instructionopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |