ComfyUI Node

LM Config

Sampling settings for an LM node (Qwen LM). Only the fields you change, or feed by a link, are applied; every other field keeps the linked model's official default for its mode (thinking on / off), shown on the node (greyed on the classic canvas; the Vue renderer has no greyed look that still takes input). The node's menu item Reset to model defaults clears the changes.

By 0xBeycan·Created 21 days ago·Updated about 24 hours ago· 2
LM Config
    • config
    ◄do_sampletrue►
    ◄temperature0.70►
    ◄top_k20►
    ◄top_p0.80►
    ◄min_p0.00►
    ◄repetition_penalty1.00►
    ◄presence_penalty1.50►
    ◄mtpauto►
    ◄edited►
    CategoryBCNodes/lm

    Inputs (9)

    NameTypeDefaultDescription
    do_sampleBOOLEANtrueOn: sample with the settings below and the LM node's seed. Off: greedy, the most likely token each step; core then applies no temperature, filter or penalty.
    temperatureFLOAT0.700.01–2Divides the logits: lower is more focused, higher more varied.
    top_kINT200–1000Keep only the k most likely tokens; 0 = off.
    top_pFLOAT0.800–1Keep the most likely tokens up to this total probability; 1.0 = off. Core leaves out the token that crosses it, a slightly smaller set than the official implementation keeps.
    min_pFLOAT0.000–1Drop the tokens less likely than min_p x the most likely one; 0 = off.
    repetition_penaltyFLOAT1.000–5Tokens already generated (never the prompt or the prefill) have their logits divided by it (multiplied when negative); 1.0 = off.
    presence_penaltyFLOAT1.500–5Subtracted from the logits of tokens already generated (never the prompt or the prefill); 0 = off. Official advice: 0 to 2 against endless repetition; a higher value can mix languages and cost some quality.
    mtpCOMBOautoMulti-token prediction: faster decoding with the file's MTP head. auto adapts the draft depth, 2-5 pins it, off disables it. Runs only for text-only prompts (no image) on files with an MTP head (Qwen3.5-4B / 9B, Qwen3.8-27B); elsewhere the run goes without it. Sampled output differs from non-MTP output for the same seed.
    editedSTRINGThe fields changed on this node, comma-separated (kept by the node, hidden there). Only these, and the fields fed by a link, are applied; the others keep the LM node's model defaults.

    Outputs (1)

    NameTypeDescription
    configBC_LM_CONFIG—