MinusZone - LLamaCPPOptions
The sampler kitchen-sink for every local-LLM node in this pack
- llama_cpp_options
LLamaCPPOptions is a pass-through config node: every field it exposes is an argument handed straight to llama.cpp when the pack's prompt nodes run the local model. It's not a node that does anything on its own - it's a bag of settings you plug into the llama_cpp_options input on CLIPTextEncode(LLamaCPP Universal), the image interrogators, or the deprecated v1 text-encode nodes. Think of it as the sampler settings panel for your LLM, except the defaults are already tuned for prompt generation, so you can ignore it entirely and still get good results.
The inputs that actually matter
There are twenty of them and you will touch maybe five:
n_gpu_layers- default-1(offload everything to GPU). Drop it to0for pure CPU, or to a number of layers to fit VRAM. This is the single most useful knob in the whole node when the LLM is competing with your diffusion model for memory.temperature- default1.6, which is hot for a reason: you want the LLM to get creative with your prompt, not play it safe. Lower it toward0.7if outputs feel rambling; raise it if every prompt comes back the same.max_tokens- default4096, the ceiling on how long the beautified prompt can get. Drop it to1024if you're on CPU and waiting forever.top_p/min_p- defaults0.95/0.05. Standard nucleus/min-p sampling; you can leave them alone.split_mode-LLAMA_SPLIT_MODE_NONE,LAYER, orROWfor multi-GPU setups. On a single card leave it at NONE.
The rest - n_ctx (2048), n_batch (2048), n_threads (0 = auto), top_k (50), repeat_penalty (1.1), tfs_z, the two mirostat modes, and the frequency/presence penalties - are straight llama.cpp sampler parameters. If you've ever tuned a local LLM in llama.cpp, nothing here is new. If you haven't, don't go poking; the defaults are sane for this use case.
One output, many destinations
It returns a single llama_cpp_options object. That's the whole node. Wire it into any MZ node that accepts llama_cpp_options, and it applies to every LLM call that node makes. Leave it disconnected and the nodes run with the same default values internally - so this is purely for when you need control.
Installing and gotchas
No separate install: it ships with ComfyUI-Prompt-MZ, which you get from ComfyUI Manager (search "MinusZone") or:
cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-Prompt-MZ
The pack needs llama-cpp-python and diskcache from its requirements.txt. And this node is where the single most-reported pack error lives: if you see module 'llama_cpp' has no attribute 'LLAMA_SPLIT_MODE_LAYER', your llama-cpp-python is too old to expose the split_mode enum that this node's dropdown feeds in. The fix is in the pack's own FAQ: upgrade llama-cpp-python to the latest release from the abetlen/llama-cpp-python releases page. A related Windows trap is LLama.dll failing to load, which the author pins on CUDA version - switch your ComfyUI PyTorch build to CUDA 12.1 (in the "秋叶" launcher: Advanced settings → environment maintenance → install PyTorch → pick CUDA 12.1).
One fair warning: because every option has an extreme min/max range exposed in the UI, it's easy to set something like a 100k n_ctx and wonder why the LLM node suddenly takes a minute to start. Context size costs real memory. If the pack's nodes get slow, check here before blaming the model.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| n_ctx | INT | 2048-18446744073709550000–18446744073709550000 | — |
| n_batch | INT | 2048-18446744073709550000–18446744073709550000 | — |
| n_threads | INT | 0-18446744073709550000–18446744073709550000 | — |
| n_threads_batch | INT | 0-18446744073709550000–18446744073709550000 | — |
| split_mode | COMBO | LLAMA_SPLIT_MODE_NONE | 3 options: LLAMA_SPLIT_MODE_NONE, LLAMA_SPLIT_MODE_LAYER, LLAMA_SPLIT_MODE_ROW |
| main_gpu | INT | 0-18446744073709550000–18446744073709550000 | — |
| n_gpu_layers | INT | -1-18446744073709550000–18446744073709550000 | — |
| max_tokens | INT | 4096-18446744073709550000–18446744073709550000 | — |
| temperature | FLOAT | 1.60-18446744073709550000–18446744073709550000 | — |
| top_p | FLOAT | 0.95-18446744073709550000–18446744073709550000 | — |
| min_p | FLOAT | 0.05-18446744073709550000–18446744073709550000 | — |
| typical_p | FLOAT | 1.00-18446744073709550000–18446744073709550000 | — |
| stop | STRING | — | |
| frequency_penalty | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| presence_penalty | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| repeat_penalty | FLOAT | 1.10-18446744073709550000–18446744073709550000 | — |
| top_k | INT | 50-18446744073709550000–18446744073709550000 | — |
| tfs_z | FLOAT | 1.00-18446744073709550000–18446744073709550000 | — |
| mirostat_mode | COMBO | none | 3 options: none, mirostat, mirostat_v2 |
| mirostat_tau | FLOAT | 5.00-18446744073709550000–18446744073709550000 | — |
| mirostat_eta | FLOAT | 0.10-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llama_cpp_options | LLamaCPPOptions | — |