LLM Options: Textgen
The full Textgen sampler menu, exposed
- options
LLM Options: Textgen is the most complete of the pack's three options nodes, because oobabooga Textgen exposes the whole llama.cpp-family sampler menu and this node exposes most of it back to you. It's for the same toggle-per-parameter pattern as the others: each parameter has an enable_* Boolean in front of it, everything starts OFF, and only what you enable is sent to the backend. Output is an LLM_OPTIONS object for LLM Generate (Advanced)'s options input. Disconnect it and Textgen uses whatever its own settings say.
What's on the menu
The familiar core plus a few Textgen favorites you won't find on the other two nodes:
temperature(default 0.7),top_p(1.0),top_k(40),seed(0) - the standard quartet.min_p(default 0) - a newer, increasingly popular filter: drop any token whose probability is belowmin_prelative to the top token. It's the modern replacement for a lot of top_k fiddling, and Textgen has supported it for ages.repeat_penalty(1.1),presence_penalty/frequency_penalty(0) - the repetition controls.typical_p(1.0) - typical sampling, which trims tokens based on how "surprising" they are relative to the expected distribution. A Textgen staple.tfs(1.0) - tail-free sampling, the entropy-based cutoff that was all the rage in the early local-LLM days and still lives in Textgen's UI. Values below 1.0 trim more aggressively.max_tokens(default 512) andstop_string(mapped to thestopAPI parameter).
That's twelve toggles total, which is a lot of knobs - and the honest guidance is that you don't need most of them. The ones people actually reach for: temperature for general randomness, min_p as the single "crank this to clean up garbage output" control, and repeat_penalty when a model starts looping. The rest are the fun-zone of the sampling hobby, not the load-bearing defaults. Start with everything off, let Textgen's own settings do their thing, and only enable what a specific model misbehaves on.
Why it exists
Textgen is the pack's first-class citizen (the README's product direction says "Textgen-first"), so it gets the full sampler surface while LM Studio and OpenAI get trimmed sets. If you run oobabooga, this node is how you bring per-node sampling control into the graph instead of editing the Textgen UI between runs. Combined with the dedicated LLM Provider: Textgen and its integrated VRAM handling, it's the intended "everything for Textgen" stack. Unsupported parameters are dropped silently (info-level log), same as the other options nodes.
Install
Pack standard: ComfyUI Manager search "comfyui-llm-bikeshed", or clone into custom_nodes/ and pip install -r requirements.txt. Only pyyaml and requests, already in ComfyUI core - no model downloads, no config needed here. The node only builds a dict; your Textgen URL and any --api-key / --admin-key live on the provider and in config.yaml.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| enable_temperatureopt | BOOLEAN | false | — |
| temperatureopt | FLOAT | 0.700–2 | — |
| enable_top_popt | BOOLEAN | false | — |
| top_popt | FLOAT | 1.000–1 | — |
| enable_max_tokensopt | BOOLEAN | false | — |
| max_tokensopt | INT | 5120–128000 | Output cap. 0 omits the field (host default). |
| enable_seedopt | BOOLEAN | false | — |
| seedopt | INT | 00–18446744073709550000 | — |
| enable_stop_stringopt | BOOLEAN | false | — |
| stop_stringopt | STRING | — | |
| enable_top_kopt | BOOLEAN | false | — |
| top_kopt | INT | 400–500 | — |
| enable_min_popt | BOOLEAN | false | — |
| min_popt | FLOAT | 0.000–1 | — |
| enable_repeat_penaltyopt | BOOLEAN | false | — |
| repeat_penaltyopt | FLOAT | 1.100–5 | — |
| enable_presence_penaltyopt | BOOLEAN | false | — |
| presence_penaltyopt | FLOAT | 0.00-2–2 | — |
| enable_frequency_penaltyopt | BOOLEAN | false | — |
| frequency_penaltyopt | FLOAT | 0.00-2–2 | — |
| enable_typical_popt | BOOLEAN | false | — |
| typical_popt | FLOAT | 1.000–1 | — |
| enable_tfsopt | BOOLEAN | false | — |
| tfsopt | FLOAT | 1.000–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | LLM_OPTIONS | — |