Nodes/Multimodal — LLM (Local-first: GGUF + Transformers)/Multimodal — GGUF settings sorter (auto defaults)
ComfyUI Node

Multimodal — GGUF settings sorter (auto defaults)

Guess-free GGUF settings by reading the filename instead of your mind

By theonetwoone·Created 6 months ago·Updated 2 months ago· 2
Multimodal — GGUF settings sorter (auto defaults)
    • gguf_vlm_handler
    • gguf_n_ctx
    • do_sample
    • temperature
    • top_p
    • top_k
    • max_new_tokens
    • repetition_penalty
    • use_repetition_penalty
    • gguf_chat_template_enable_thinking
    ◄gguf_main_models_llm— use path fields below —►
    ◄gguf_mmproj_models_llm— use path fields below —►
    ◄prefer_fasttrue►

    Every GGUF VLM setup opens with the same ritual: you've got the weights, but what gguf_vlm_handler should you pick? Is 12,288 tokens of context right? Should sampling be on or off? If you'd rather not consult your horoscope for these answers, this node reads the GGUF filenames you've already selected and returns a full set of sensible defaults - ten settings in one shot.

    How it works

    It's a filename heuristic, and it's transparently that. The node takes gguf_main_models_llm and gguf_mmproj_models_llm (the same pickers the main LLM node uses, scanning ComfyUI/models/llm/), glues the two filenames together, and pattern-matches the text. "gemma3" in the name → gemma3 handler; "qwen3" → qwen3-vl; "qwen2.5" → qwen2.5-vl; "llava" → 1.5 or 1.6 depending on what's in the string. Then it applies model-family-aware context sizing and sampling rules - Qwen VL gets roomier context, LLaVA gets a smaller default n_ctx - and respects a prefer_fast toggle (default true) that leans toward lower context, greedy decoding, and 1024 max_new_tokens instead of 5000.

    That last part matters, because this node is opinionated about speed. If you want maximum output quality and don't mind waiting, flip prefer_fast off and it nudges context up and sampling on.

    The output bundle

    Ten outputs, one per setting the main node accepts:

    gguf_vlm_handler, gguf_n_ctx, do_sample, temperature, top_p, top_k, max_new_tokens, repetition_penalty, use_repetition_penalty, gguf_chat_template_enable_thinking.

    You wire them into the matching inputs on MultimodalLLMNode - and if that sounds like ten wires of pure tedium, yes, it is, which is the trade-off. You're trading a couple of minutes of drag-and-drop for not having to remember whether Qwen3-VL wants 16k context or the exact temperature range it performs best in.

    The caveat

    Because it only reads filenames, it can't see what's inside the GGUF. A repo that names its Qwen2.5 file "qwen_vl_7b.gguf" without the "2.5" will get guessed wrong, and nothing checks the guess until the model actually runs - wrong handler means no vision or garbage replies. Treat it as an excellent starting point, not a proof. If the output looks off, read the filename again, set gguf_vlm_handler manually, and let the rest of the defaults stand. For the majority of well-named downloads (which is most of what people actually grab), this is the fastest path from "two .gguf files in a folder" to "working vision run" in the whole pack.

    Categoryllm/multimodal

    Inputs (3)

    NameTypeDefaultDescription
    gguf_main_models_llmCOMBO— use path fields below —1 options: — use path fields below —
    gguf_mmproj_models_llmCOMBO— use path fields below —1 options: — use path fields below —
    prefer_fastBOOLEANtrue—

    Outputs (10)

    NameTypeDescription
    gguf_vlm_handlerSTRING—
    gguf_n_ctxINT—
    do_sampleBOOLEAN—
    temperatureFLOAT—
    top_pFLOAT—
    top_kINT—
    max_new_tokensINT—
    repetition_penaltyFLOAT—
    use_repetition_penaltyBOOLEAN—
    gguf_chat_template_enable_thinkingBOOLEAN—