Nodes/LLM Wildcard Manager/🎲 LLM Sampling Options
ComfyUI Node

🎲 LLM Sampling Options

Fine-grained sampling knobs for the LLM, without touching the server config

By pclshmΒ·Created 5 months agoΒ·Updated 4 months agoΒ· 1
🎲 LLM Sampling Options
  • server
  • server
  • options
β—„use_model_default_samplingfalseβ–Ί
β—„temperature-1.00β–Ί
β—„top_k0β–Ί
β—„top_p0.00β–Ί
β—„min_p0.00β–Ί
β—„repeat_penalty1.00β–Ί
β—„context_size0β–Ί
β—„system_promptβ–Ί
β—„show_everything_in_consolefalseβ–Ί

The LLM Wildcard Manager pack works fine with just a 🎲 LLM Server Config feeding the Manager and Resolver. LLM Sampling Options is the optional layer for when you want to tune how the model samples - top-k, top-p, min-p, repetition penalty, context size - without editing a config file or restarting anything. You drop it between the Server Config and the rest of the pack: LLMServerConfig β†’ LLMSamplingOptions β†’ Manager/Resolver. Its server output is still an LLM_SERVER, so it slots in anywhere the base server does.

It's the least documented node in the pack - it's not even in the README's node table - which is a shame, because it's the one that saves you when the wildcard resolver starts emitting weirdly repetitive values. That's a sampling problem as much as a prompt problem, and repeat_penalty is the lever for it.

What you can tune

  • temperature - override the server's value; -1 keeps the server's. 0.0 is deterministic, 2.0 very random.
  • top_k, top_p, min_p - the usual sampling controls. 0 means "not sent," so the server uses its own defaults.
  • repeat_penalty - repetition penalty, 1.0 = off. Bump it when a category keeps producing near-identical values.
  • context_size - token window in tokens; 0 = server default. Handy when you're running Ollama on a small card and want to cap the context so the model stays fast.
  • use_model_default_sampling - the reset button: drop all overrides and let the model use built-in defaults. Temperature from the base server still applies.
  • system_prompt - here's the catch worth knowing. This field is only honored if you wire the node into an external consumer that reads it - specifically the "Prompt Generator" node from ComfyUI-Prompt-Manager. The wildcard Manager and Resolver use their own per-step prompts and ignore it. So don't expect this to change wildcard behavior.
  • show_everything_in_console - prints the system prompt, user prompt, sampling options, and raw replies to the ComfyUI console. This is your debugging switch; flip it when a slot misbehaves and you want to see the exact request.

Outputs

Two sockets:

  • server - the enhanced LLM_SERVER, layered on top of whatever came from upstream. Wire this to the Manager and Resolver instead of the raw config.
  • options - an OPTIONS bundle shaped to match ComfyUI-Prompt-Manager's "Prompt Generator" node contract. Wire it into that node's options input and you can drive sampling, model, and system prompt from one place across both packs.

Under the hood it's just a dict merge: it shallow-copies the upstream server bundle, adds the fields you set, and only sends a sampling key when its value is non-zero (or above 1.0 for the penalty). Zero fiddly behavior, which is more than you get from most "options" nodes.

Installing

Same pack install: ComfyUI Manager β†’ LLM Wildcard Manager, or git clone https://github.com/pclshm/comfyui-llm-wildcard-manager into ComfyUI/custom_nodes, restart. No deps, no models.

If you never change sampling settings, skip it - it's strictly an override layer and the Server Config's temperature alone will get you 90% of the way. Add it when the resolver's output starts feeling same-y or you're debugging a specific slot, and keep show_everything_in_console in your back pocket.

Categoryprompt/wildcards

Inputs (10)

NameTypeDefaultDescription
serverLLM_SERVERβ€”
use_model_default_samplingoptBOOLEANfalseIf ON, drop all sampling overrides and let the model use its built-in defaults. Temperature from the base server is still applied.
temperatureoptFLOAT-1.00-1–2Override the server's temperature (-1 = keep server value). 0.0 = deterministic, 2.0 = very random.
top_koptINT00–200Sample from top K tokens (0 = disabled / not sent).
top_poptFLOAT0.000–1Nucleus sampling threshold (0.0 = not sent).
min_poptFLOAT0.000–1Minimum probability relative to the top token (0.0 = not sent).
repeat_penaltyoptFLOAT1.001–2Repetition penalty (1.0 = no penalty / not sent).
context_sizeoptINT00–131072Context window size in tokens (0 = use server default / not sent).
system_promptoptSTRINGCustom system prompt. Used only when wired into a node that reads it (e.g. Prompt Generator). Leave empty to use the consumer's defaults.
show_everything_in_consoleoptBOOLEANfalsePrint system prompt, user prompt, sampling options, and raw replies to the ComfyUI console.

Outputs (2)

NameTypeDescription
serverLLM_SERVERβ€”
optionsOPTIONSβ€”