Nodes/ComfyUI_Simple_Qwen3-VL-gguf/Qwen-VL Sampling Config
ComfyUI Node

Qwen-VL Sampling Config

LLM Sampling Config

By KLL535Β·Created 9 months agoΒ·Updated about 12 hours agoΒ· 86
Qwen-VL Sampling Config
    • config
    β—„max_tokens2048β–Ί
    β—„temperature0.70β–Ί
    β—„top_p0.92β–Ί
    β—„min_p0.05β–Ί
    β—„top_k0β–Ί
    β—„repeat_penalty1.10β–Ί
    β—„presence_penalty0.0β–Ί
    β—„frequency_penalty0.0β–Ί
    β—„image_min_tokens0β–Ί
    β—„image_max_tokens0β–Ί
    β—„config_overrideβ€”β–Ί

    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 with top_k.
    • min_p - this is the one people sleep on: it cuts off tokens whose probability is below min_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. 0 disables 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.

    Category🌐 SimpleQwenVL

    Inputs (11)

    NameTypeDefaultDescription
    max_tokensINT204816–32768Maximum number of tokens to generate. Thinking models usually need more.
    temperatureFLOAT0.700–20.1=focused, 0.7=balanced, 1.2+=creative. Lower = more deterministic.
    top_pFLOAT0.920–1Nucleus sampling: cumulative probability cutoff. Lower = more focused.
    min_pFLOAT0.050–1Cut off tokens with prob < min_p * (top_token_prob). Great for reducing garbage.
    top_kINT00–500Limit to top-K tokens. 0 = disabled. Good for strict output.
    repeat_penaltyFLOAT1.101–2Penalty for repeating tokens. >1.0 discourages loops.
    presence_penaltyFLOAT0.0-2–2Penalize tokens that appeared at all. >0 encourages new topics.
    frequency_penaltyFLOAT0.0-2–2Penalize tokens by frequency. >0 reduces repetition of common words.
    image_min_tokensINT00–8192Min tokens for image embedding. 0 = not set
    image_max_tokensINT00–16384Max tokens for image embedding. 0 = not set
    config_overrideoptSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    configSTRINGβ€”