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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| do_sample | BOOLEAN | true | On: 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. |
| temperature | FLOAT | 0.700.01–2 | Divides the logits: lower is more focused, higher more varied. |
| top_k | INT | 200–1000 | Keep only the k most likely tokens; 0 = off. |
| top_p | FLOAT | 0.800–1 | Keep 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_p | FLOAT | 0.000–1 | Drop the tokens less likely than min_p x the most likely one; 0 = off. |
| repetition_penalty | FLOAT | 1.000–5 | Tokens already generated (never the prompt or the prefill) have their logits divided by it (multiplied when negative); 1.0 = off. |
| presence_penalty | FLOAT | 1.500–5 | Subtracted 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. |
| mtp | COMBO | auto | Multi-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. |
| edited | STRING | The 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)
| Name | Type | Description |
|---|---|---|
| config | BC_LM_CONFIG | — |