Nodes/Ollama-ImageList/Llama.cpp Model Profile
ComfyUI Node

Llama.cpp Model Profile

The preset node that does the thinking about your model for you

By craftingmod·Created about a month ago·Updated 12 days ago· 2
Llama.cpp Model Profile
    • model profile
    profileGeneral
    custom_handlerauto
    temperature0.20
    top_p0.95
    top_k40
    min_p0.05
    repeat_penalty1.00
    presence_penalty0.00
    custom_chat_template

    The compact generation nodes in this pack are designed around a single idea: stable settings live behind typed sockets, not scattered across a hundred widgets. Llama.cpp Model Profile is the most important of those sockets, because it's the only required one. It bundles the chat handler and the sampling defaults for a specific model into one connection, and when you pick a profile you get sampling values that were tuned for that model rather than a generic starting point.

    The profile combo is where you choose your model family: General (0.2 temperature, top_p 0.95, top_k 40 - the safe default), Gemma 4 Vision and Muse Glimmer (both 1.0 temperature, top_k 64), Qwen 3.5 Thinking (1.0 temp, top_k 20, presence_penalty 1.5, reasoning on), Qwen 3.5 Non-thinking (0.7 temp, top_p 0.8, reasoning off), and Qwen 3 VL (0.7 temp, top_p 0.8). The Qwen profiles carry a presence penalty of 1.5 - that's a genuine choice, pushing the model toward novelty - and the reasoning mode travels with the profile for the Qwen 3.5 pair. When you select Custom, the node reveals the custom_handler and six sampling inputs so you can roll your own; switching back to a named profile keeps your custom values stored without applying them, which is a nice touch if you're experimenting.

    Two details that show the care here. First, presence_penalty is forwarded to the targeted JamePeng fork under its API spelling present_penalty - the docs call that out explicitly, so don't be confused if your sampling logs show a slightly different key name. Second, the Qwen 3 VL card doesn't prescribe a min_p, so its profile sets it to 0.0 - no extra minimum-probability filter imposed. The tooltips and docs are unusually precise about this stuff.

    Wiring is simple: connect model profile to the model_profile input of either compact Llama.cpp Generate or Sequential Generate. It's required on both, so you'll always see it.

    Setup is the pack standard:

    cd ComfyUI/custom_nodes
    git clone https://github.com/craftingmod/ComfyUI-Ollama-ImageList
    

    Restart ComfyUI afterwards. The usual llama.cpp prerequisites apply: a JamePeng multimodal llama-cpp-python wheel in ComfyUI's Python, and ComfyUI 0.19.3+.

    Honest verdict: this node is 90% of the reason to use the compact flow instead of the legacy detailed one. The profiles encode real-world tuning decisions - Qwen 3.5's presence penalty isn't something most people would arrive at by trial and error in an afternoon - and "pick your model from a dropdown, connect it, done" beats scrolling thirty widgets every time. If you're on Gemma 4, the matching Gemma 4 Runtime Preset node pairs with it to handle the batch/token side of that model's quirks. Start with General if you're not sure; it's tuned to be stable, and you can always switch to Custom later.

    CategoryOllama/llama_cpp/compact

    Inputs (9)

    NameTypeDefaultDescription
    profileCOMBOGeneral7 options: General, Gemma 4 Vision, Muse Glimmer, Qwen 3.5+ Thinking, Qwen 3.5+ Non-thinking, Qwen 3 VL, +1
    custom_handlerCOMBOauto7 options: auto, generic, gemma4, qwen3_vl, qwen25_vl, qwen3_asr, +1
    temperatureFLOAT0.200–5
    top_pFLOAT0.950–1
    top_kINT400–10000
    min_pFLOAT0.050–1
    repeat_penaltyFLOAT1.000–5
    presence_penaltyFLOAT0.00-2–2
    custom_chat_templateoptSTRINGOptional custom Jinja chat template connected as an input socket. When provided, it overrides the GGUF metadata chat template.

    Outputs (1)

    NameTypeDescription
    model profileOLLAMA_IMAGE_LIST_LLAMA_CPP_MODEL_PROFILE