Llama.cpp Sampling Preset
The preset that keeps generation settings honest
- sampling
Llama.cpp Sampling Preset is the smallest genuinely useful node in the llama.cpp half of this pack: one combo, one typed output, no secrets. It exists because the legacy detailed Generate node exposes temperature, top_p, top_k, min_p, and repeat_penalty as five separate floating widgets, and five separate floats is five chances to leave something in a weird state. This node bundles them into a named preset you can reason about, then hands the bundle to Generate through a typed sampling socket.
The preset combo has three options, and the tooltips tell you exactly what each is for:
Image analysis(the default) - favors stable, repetitive descriptions. This is the "tell me what's in this picture, consistently" mood, which is why it's the default in a pack whose main job is feeding images to a vision model.Gemma 4- follows the model's own generation configuration, appropriate when your GGUF is a Gemma 4 checkpoint and its template carries the sampling intent.llama.cpp default- the CLI's stock defaults, no tuning applied. Useful as a baseline when you suspect a preset is doing something you don't expect.
The mechanism is straightforward: the preset is just a bundle of the five sampling values, and when the sampling output is connected to the legacy Llama.cpp Generate's sampling input, it overrides that node's individual temperature, top_p, top_k, min_p, and repeat_penalty widgets. Disconnect it and the manual floats take over again. That override behavior is the whole point - you can keep the detailed node's advanced controls for one-off experiments while still having a trustworthy default for everyday runs.
If you're using the compact flow instead, you don't need this node at all: sampling defaults there come from the Llama.cpp Model Profile, which bundles the same five values per model family with a Custom mode that exposes them as inputs. This preset is the legacy-detail equivalent.
Install is the pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/craftingmod/ComfyUI-Ollama-ImageList
Then restart ComfyUI, and note the same llama.cpp prerequisite as its siblings: the JamePeng multimodal llama-cpp-python wheel in ComfyUI's Python environment.
A fair criticism: three presets isn't many, and if you want your own carefully tuned values you'll be switching the detailed node to its manual floats or using Model Profile's Custom instead. But that's kind of the point - this node is the "stop fiddling" option. Image analysis default is a good, stable place to start, and the day you find yourself reaching for it is the day it pays for its half-second of setup.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | Image analysis | Image analysis favors stable descriptions; Gemma 4 follows the model generation configuration; llama.cpp default uses CLI defaults. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sampling | OLLAMA_IMAGE_LIST_LLAMA_CPP_SAMPLING | — |