Qwen-VL Sampling Config
LLM Sampling Config
- config
If the Model Config node is about what the model is, this one is about how it talks. LLM Sampling Config is the second half of the pack's configurator pair: it collects the generation and sampling settings - max tokens, temperature, the penalties, the image-token budget - and outputs a single config string you feed into the main Qwen node's config_override, exactly like the Model Config node.
Same clean mechanism: dials and dropdowns in, one JSON-ish string out, stackable with anything else you wire into config_override. Later values win, so you can put sampling here, model settings in the Model Config node, and a raw JSON override on top for anything exotic.
The inputs that matter
max_tokens- output budget. The tooltip nails the gotcha: thinking models need 4096+ or they get cut off mid-reasoning. For plain captioning 2048 is plenty.temperature- 0.1 is focused/deterministic, 0.7 balanced, 1.2+ creative. For tag extraction and JSON output you want the low end; for caption variation, higher.top_p- nucleus sampling cutoff (default 0.95). Lower = more focused. Combines withtop_k.min_p- this is the one people sleep on: it cuts off tokens whose probability is belowmin_p Γthe top token's probability. It's a great garbage reducer - leave it at the default 0.05 and marvel at how much less junk the model emits.top_k- hard limit to the K most likely tokens.0disables it (default here is 40). Good for keeping strict output in line.repeat_penalty- >1.0 discourages loops and repeated phrasing. The README's defaults hover around 1.05β1.1.presence_penalty/frequency_penalty- one penalizes topics already introduced, the other penalizes frequent words. Positive values push the model toward new ground; useful for caption variety in a batch.image_min_tokens/image_max_tokens- how many tokens the vision projector gets per image.0= let the model decide. If your answers truncate or your context overflows with images in the prompt, this is where you tighten the budget.
Install
It ships in KLL535/ComfyUI_Simple_Qwen3-VL-gguf, so it comes with the main Qwen node:
cd ComfyUI/custom_nodes
git clone https://github.com/KLL535/ComfyUI_Simple_Qwen3-VL-gguf
or ComfyUI Manager (search ComfyUI_Simple_Qwen3-VL-gguf), restart, F5.
The honest verdict: for a quick captioning run you can ignore almost all of this - the defaults are sane. Where it shines is the moment you start doing batch captioning or structured-JSON output, where a stable low temperature, a tight top_k, and min_p turn a flaky model into a reliable one. If you're not doing that yet, bookmark it and move on. If you are, this node is the difference between hand-editing JSON strings and having a set of labeled knobs that still make sense when you open the workflow next month.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| max_tokens | INT | 204816β32768 | Maximum number of tokens to generate. Thinking models usually need more. |
| temperature | FLOAT | 0.700β2 | 0.1=focused, 0.7=balanced, 1.2+=creative. Lower = more deterministic. |
| top_p | FLOAT | 0.920β1 | Nucleus sampling: cumulative probability cutoff. Lower = more focused. |
| min_p | FLOAT | 0.050β1 | Cut off tokens with prob < min_p * (top_token_prob). Great for reducing garbage. |
| top_k | INT | 00β500 | Limit to top-K tokens. 0 = disabled. Good for strict output. |
| repeat_penalty | FLOAT | 1.101β2 | Penalty for repeating tokens. >1.0 discourages loops. |
| presence_penalty | FLOAT | 0.0-2β2 | Penalize tokens that appeared at all. >0 encourages new topics. |
| frequency_penalty | FLOAT | 0.0-2β2 | Penalize tokens by frequency. >0 reduces repetition of common words. |
| image_min_tokens | INT | 00β8192 | Min tokens for image embedding. 0 = not set |
| image_max_tokens | INT | 00β16384 | Max tokens for image embedding. 0 = not set |
| config_overrideopt | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config | STRING | β |