Unsloth Options
Eight enable toggles standing between you and the server's defaults
- options
Unsloth Options is a pass-through node with a quirk: every sampling parameter ships with its own enable_ boolean, and only the ones you switch on are sent. So the node's real job isn't the sliders - it's the toggles. Flip nothing and the server picks the sampling settings for the model, which is often the best answer you're going to get.
That's worth sitting with for a second. Unsloth's docs say it automatically selects recommended settings per model - context length, temperature and friends - when the request doesn't specify any. Override blindly, especially on a model whose card recommends low temperature, and you've made things worse with more confident-looking numbers. Connect this node to the Generate node's options input and use the toggles deliberately.
The ones a beginner actually sets
temperature (default 0.8, needs enable_temperature). Higher is more creative, lower is more focused. Captioning and JSON output want you down around 0.2–0.5; prompt brainstorming is fine at 0.8–1.0.
max_tokens (default 512, needs enable_max_tokens). The widget caps at 2048. The default is a real trap for captioning a long prompt or writing scene description - the output just stops mid-sentence. Raise it before you blame the model.
stop (needs enable_stop). Generation halts when this text appears, and the pack wraps your single string into the list the API expects. This is the practical fix for the classic in-graph LLM problem: a chat model tacking on a preamble or a role delimiter. Give it the string you never want to see and it stops there.
seed (needs enable_seed). The tooltip says "deterministic sampling seed (best-effort)" and means it - this is a sampling seed on the server, not a ComfyUI randomness control. Its default value is rolled once when the node class is registered, so it holds steady across runs until you change it or restart.
Then the ones you reach for later: top_p (nucleus sampling, default 0.95), top_k (default 40), min_p (default 0, cut tokens below a probability relative to the top candidate), repetition_penalty (default 1.1, >1 discourages repetition) and presence_penalty, which is in OpenAI's parameter set and rarely needs touching with repetition_penalty in play.
debug is not an API parameter - the tooltip says so. It prints the options dump on the node side, and because Generate reads the same flag, it also dumps the request, the JSON payload and the raw response to the console. When you can't tell whether your temperature ever made it into the request, this is how you find out.
How it works
The node collects all its widgets into a dict and hands that out as a single options output. Before the request goes anywhere, the pack filters it down: for each option field, the value is included only if its enable_<field> flag is true, and the enable flags themselves are dropped. The debug key never reaches the API either. Stop is the one field that gets transformed rather than passed straight through, wrapped into a list.
The dict also carries through the meta chain, so chained Generate nodes inherit the same options - and any direct connection to a later node's options input overrides what came along in the chain.
Install
Nothing specific to this node; it arrives with the pack. Manager → Install Custom Nodes → search Unsloth Desktop Nodes (registry id dever/dever-unsloth) → Install → restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/DeverStyle/comfyui-dever-unsloth.git
It uses only requests, PIL and numpy, which ComfyUI already has - the pack has no dependency install step of its own. The external requirement is still Unsloth Desktop running with model auto-switch enabled and a valid API key on the Connectivity node.
Where people get burned
Typed a value into a disabled field. Nine times out of ten this is why your temperature "didn't do anything." The number is right there in the widget, so it looks applied; the toggle says otherwise.
Set max_tokens low and got truncated JSON. Then format: json on the Generate node hands you invalid JSON and whatever parses it downstream fails confusingly. If you're forcing JSON, leave room.
Fought the server's defaults for no reason. The pack is a thin client over Unsloth's llama.cpp server, which already has per-model recommended settings. The KB's point about the job selecting for small and obedient applies to sampling too - a model being told to rewrite a prompt into a shape wants consistency, not creativity.
Chained nodes, one Options node. Fine, and intended. Options passes down the meta chain and can be overridden per node; if you want a hot-temperature brainstorm step followed by a cold JSON step, that's two Options nodes and two direct connections.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| enable_temperature | BOOLEAN | false | — |
| temperature | FLOAT | 0.800–2 | Higher = more creative/less focused. |
| enable_top_p | BOOLEAN | false | — |
| top_p | FLOAT | 0.950–1 | Nucleus sampling. Lower = more focused. |
| enable_top_k | BOOLEAN | false | — |
| top_k | INT | 400–100 | Limit sampling to the top-k most likely tokens. |
| enable_min_p | BOOLEAN | false | — |
| min_p | FLOAT | 0.000–1 | Minimum probability relative to the most likely token. |
| enable_repeat_penalty | BOOLEAN | false | — |
| repetition_penalty | FLOAT | 1.100–2 | Penalize repeated tokens. >1 discourages repetition. |
| enable_presence_penalty | BOOLEAN | false | — |
| presence_penalty | FLOAT | 0.000–2 | Penalize tokens already present in the output. |
| enable_seed | BOOLEAN | false | — |
| seed | INT | 1008725000–2147483648 | Deterministic sampling seed (best-effort). |
| enable_stop | BOOLEAN | false | — |
| stop | STRING | Stop sequence. Generation halts when this text appears. | |
| enable_max_tokens | BOOLEAN | false | — |
| max_tokens | INT | 5121–2048 | Maximum tokens to generate. |
| debug | BOOLEAN | false | Node-side debug printing only — no effect on the API. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | UNSLOTH_OPTIONS | — |