QwenVL (HF Alt Advanced)
QwenVL (HF Alt) with the sampling dials exposed — tuned captions, one widget at a time
- image
- video
- RESPONSE
"QwenVL (HF Alt Advanced)" is the tooltipped HF variant of the pack with every parameter pulled out onto the widget. Same Qwen3-VL transformer engine, same auto-download into models/LLM/Qwen-VL, same "local captioning, no API key" pitch - plus temperature, top_p, num_beams, repetition_penalty, frame_count, device, use_torch_compile, and a max token budget that stretches to 4096. If you've decided the plain HF node is your captioner but its fixed internal settings keep missing, this is the version to run.
What the extra knobs do
The sampling row behaves exactly like the other Advanced nodes in this pack, only here the tooltips actually tell you the numbers. temperature: "0.2–0.4 is focused, 0.7+ is creative." top_p: "0.9–0.95 allows more variety." repetition_penalty: "1.1–1.3 penalize repeated phrases." And the sharp edge of the set: num_beams - "values >1 disable temperature/top_p and trade speed for more stable answers." So you can't have both beam stability and sampling creativity at once, which is the single most useful fact about this node, and it's written right there in the hover text.
The runtime row: device for auto/cpu/mps or an explicit GPU, use_torch_compile for a throughput boost after a one-time compile, and frame_count (1–64, default 16) for how many frames get sampled out of a video input before prompting. max_tokens here reaches 4096 - enough for genuinely long analyses - and the rest of the widget is the familiar set: model pick (2B/4B/8B, Instruct/Thinking, FP8 variants), quantization (FP16/8-bit/4-bit), the 🖼️ preset prompt menu, custom_prompt, keep_model_loaded, and seed (which, per the tooltip, governs both sampling and frame picking - reuse it to reproduce an exact run).
The inputs that matter
- num_beams - the fork in the road: 1 for sampled variety, 2–4 for stable answers (and it overrides temperature/top_p while on).
- temperature / top_p - 0.2–0.4 for disciplined training captions, 0.7+ for creative writing.
- frame_count - only for video; more frames = more context, more time.
- use_torch_compile - a real speedup on supported CUDA/Torch 2.1+ after the first compile pass.
Inputs are image and video; output is a single RESPONSE string, and - same as the plain HF node - it is not an output node, so you need a ShowText or the pack's aistudynow_SaveText to see the text in the UI.
Getting it
Identical to the rest of the pack - ComfyUI Manager, search "ComfyUI-QwenVL", or:
cd ComfyUI/custom_nodes
git clone https://github.com/aistudynow/ComfyUI-QwenVL
First run downloads the chosen weights into models/LLM/Qwen-VL; 4/8-bit quantization wants CUDA and bitsandbytes; attention_mode uses flash-attn when present on Linux x86_64 and falls back to SDPA otherwise.
Where people get burned
The beam-vs-sampling trap is #1: crank num_beams to 3, dial temperature to 0.9, get deterministic output, and conclude the node ignores you. It doesn't - the tooltip on num_beams says exactly what's happening. Second, use_torch_compile on its first run looks like a hang while it compiles; give it a minute. Third, video jobs with high frame_count plus a big model can OOM a 12 GB card - that's the moment to drop to 8-bit, the 2B, or fewer frames. And remember the Instruct-model refusal quirk if your captions come back sanitized; abliterated builds exist, though users of this pack report those can be inconsistent, so spot-check before captioning a whole dataset on one. For captioning a LoRA set with tight quality control, this node plus a low temperature and repetition_penalty around 1.2 is a setup you can actually trust.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Qwen3-VL-2B-Instruct | Pick the Qwen-VL checkpoint. First run downloads weights into models/LLM/Qwen-VL, so leave disk space. |
| quantization | COMBO | None (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_mode | COMBO | auto | auto tries flash-attn v2 when installed and falls back to SDPA. Only override when debugging attention backends. |
| use_torch_compile | BOOLEAN | false | Enable torch.compile('reduce-overhead') on supported CUDA/Torch 2.1+ builds for extra throughput after the first compile. |
| device | COMBO | auto | Choose where to run the model: auto, cpu, mps, or cuda:x for multi-GPU systems. |
| preset_prompt | COMBO | 🖼️ Detailed Description | Built-in instruction describing how Qwen-VL should analyze the media input. |
| custom_prompt | STRING | Optional override—when filled it completely replaces the preset template. | |
| max_tokens | INT | 51264–4096 | Maximum number of new tokens to decode. Larger values yield longer answers but consume more time and memory. |
| temperature | FLOAT | 0.600.1–1 | Sampling randomness when num_beams == 1. 0.2–0.4 is focused, 0.7+ is creative. |
| top_p | FLOAT | 0.900–1 | Nucleus sampling cutoff when num_beams == 1. Lower values keep only top tokens; 0.9–0.95 allows more variety. |
| num_beams | INT | 11–8 | Beam-search width. Values >1 disable temperature/top_p and trade speed for more stable answers. |
| repetition_penalty | FLOAT | 1.200.5–2 | Values >1 (e.g., 1.1–1.3) penalize repeated phrases; 1.0 leaves logits untouched. |
| frame_count | INT | 161–64 | Number of frames extracted from video inputs before prompting Qwen-VL. More frames provide context but cost time. |
| keep_model_loaded | BOOLEAN | true | Keeps the model resident in VRAM/RAM after the run so the next prompt skips loading. |
| seed | INT | 11–4294967295 | Seed controlling sampling and frame picking; reuse it to reproduce results. |
| imageopt | IMAGE | — | |
| videoopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| RESPONSE | STRING | — |