Local LLM Settings (GGUF)
One Config Node to Rule All Your Local Models
- vision
- config
Every LLM node in the Kinburg pack - Local LLM (GGUF), the chat node, Token Counter, Context Sizer - takes its orders from one place: Local LLM Settings (GGUF). It's the config node that carries the model, the system prompt, the sampling, the context size, the reasoning control, and the output format, then emits the whole lot as a single config bundle. One of these can drive several LLM nodes at once, which means you change the model once and every consumer follows. It's the node you'll spend your time on, so it's worth knowing what's actually in it.
What you'll actually set
model/model_path- pick the.gguffromComfyUI/models/llm(subfolders show asfolder/model.gguf), or type a path inmodel_pathvia the placeholder. Quotes from Windows "Copy as path" are stripped automatically.system_prompt- who the model is. This is where the job gets defined.max_tokens,temperature,top_p,top_k,min_p,repeat_penalty,stop- the sampling basics.min_pof ~0.05 is a good start, often paired withtop_p=1.0,top_k=0. Stop strings go one per line.n_ctx- context size. The KV cache shrinks with it, so don't just max it out.n_gpu_layers--1= all layers on GPU,0= all CPU.flash_attn,kv_cache_type- flash attention is faster and uses less VRAM; quantizing the KV cache (q8_0/q4_0) fits a bigger context in the same card. Both auto-enable each other as needed.unload_comfy_models- frees image models from VRAM before the LLM runs.unload_llm_after_run- free the LLM after each run; off (default) keeps it warm for chat, turn it on in image workflows.
Reasoning control - the modern stuff
Modern reasoning models are switched inside the chat template, not by anything you say in the prompt. enable_thinking (model default / on / off) and reasoning_effort are handed to the model's own Jinja template as variables, so the model can't ignore them. Big caveat: model default is not off - Qwen3.5/3.8 take an undefined variable as thinking ON, Gemma-4 as OFF. The older thinking_directive (appends /no_think to the prompt) only works on original Qwen3; newer models ignore it. strip_think keeps reasoning out of the text output (it still goes to thoughts), and answer_marker handles models that reason without <think> tags.
Structured output & advanced
output_format - free text, valid JSON, a custom GBNF grammar, or ideogram4_json (a built-in prompt grammar). Grammar runs skip the live progress bar. extra_load_args passes Python-binding args to llama-cpp-python's Llama() loader (n_threads=8, main_gpu=0, tensor_split=[1,1]), one key=value per line - note these are binding args, not llama.cpp CLI flags, so --spec-type won't work here. chat_template_path overrides a broken embedded chat template; leave it empty for well-packaged models. Optional connect-only inputs: context (reference material appended to the system prompt) and vision (from a Vision Settings node). Output is just config.
Install
Pack install via ComfyUI Manager (search "Kinburg-Nodes") or git clone. Needs llama-cpp-python - Manager runs install.py automatically, or run <ComfyUI>/.venv/Scripts/python.exe <ComfyUI>/custom_nodes/Kinburg-Nodes/install.py by hand. The wheel's CUDA major must match your torch's, or you get the cudart64_12.dll load failure. One config node to change, several LLM nodes that follow - that's the whole design, and it's a good one.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | Pick a .gguf from ComfyUI/models/llm (subfolders included — organize models into folders and they show as 'folder/model.gguf'). Choose the placeholder to type any path in model_path | |
| model_path | STRING | Full path to a .gguf, used when 'model' is the placeholder. Surrounding quotes (e.g. from Windows 'Copy as path') are stripped automatically. | |
| system_prompt | STRING | You are a helpful assistant. | — |
| max_tokens | INT | 51216–32768 | — |
| temperature | FLOAT | 0.700–2 | — |
| top_p | FLOAT | 0.950–1 | — |
| top_k | INT | 400–32768 | — |
| min_p | FLOAT | 0.000–1 | Min-p sampling. 0 = off. Try ~0.05 (often paired with top_p=1.0, top_k=0) |
| repeat_penalty | FLOAT | 1.101–2 | — |
| stop | STRING | Stop strings, one per line. Generation stops as soon as any is produced | |
| n_ctx | INT | 4096256–1048576 | — |
| n_gpu_layers | INT | -1-1–1000 | -1 = all layers on GPU, 0 = all on CPU |
| n_batch | INT | 51232–8192 | — |
| flash_attn | BOOLEAN | false | Flash Attention: faster and a smaller KV cache (less VRAM) |
| kv_cache_type | COMBO | f16 | Quantize the KV cache to fit a bigger context in VRAM. q8_0/q4_0 auto-enable Flash Attention |
| seed | INT | 0-1–18446744073709550000 | — |
| unload_comfy_models | BOOLEAN | true | Unload ComfyUI (image) models from VRAM before running the LLM |
| unload_llm_after_run | BOOLEAN | false | Free the LLM from VRAM after each run. Off (default) keeps it loaded for fast repeated runs / chat; turn ON in image workflows to free VRAM. |
| strip_think | BOOLEAN | true | Keep reasoning out of the 'text' output (it still goes to the 'thoughts' output). Off = leave raw reasoning in 'text' |
| answer_marker | STRING | For models that print reasoning WITHOUT <think> tags: the answer is taken after the LAST occurrence of this marker, everything before goes to 'thoughts'. Empty = use <think> tags. | |
| thinking_directive | COMBO | model default | Append a reasoning-control directive to the PROMPT. Only original-Qwen3 models were trained to obey it — for Qwen3.5/3.8, Gemma-4 and gpt-oss use enable_thinking / reasoning_effort below instead. 'custom' uses the field below. |
| custom_directive | STRING | Directive text appended to the prompt when thinking_directive = custom (e.g. /no_think) | |
| output_format | COMBO | text | Output: free text · valid JSON · custom GBNF grammar (field below) · ideogram4_json. Grammar modes run without the live progress bar |
| grammar | STRING | GBNF grammar text, used when output_format = gbnf_grammar | |
| extra_load_args | STRING | Advanced: extra keyword args for llama-cpp-python's Llama() loader. One per line as key=value or a JSON object. These are Python-binding args, NOT llama.cpp CLI flags. Unknown keys are ignored. Changing this reloads the model. | |
| chat_template_path | STRING | Advanced: path to a chat_template.jinja file that OVERRIDES the model's built-in chat template. Empty (default) = use the template embedded in the GGUF, which is correct for almost every model. Only needed when a model ships a broken/missing embedded template, or you want a specific template variant. TEXT models only — ignored when an mmproj (vision) is active, since vision uses its own formatting. Surrounding quotes are stripped. Changing this reloads the model. | |
| enable_thinking | COMBO | model default | Reasoning switch passed to the model's chat template (Qwen3.5/3.8, Gemma-4, gpt-oss…) — unlike thinking_directive this is not prompt text, so the model cannot ignore it. 'model default' leaves the variable undefined, which each family reads its own way (Qwen3.5/3.8: thinking ON, Gemma-4: OFF). Templates that don't know the variable ignore it. |
| reasoning_effort | COMBO | model default | How hard the model should think, as a chat-template variable. Qwen3.5/3.8 accept xhigh (their default) / medium / low and ERROR on anything else; use 'custom' for other families (gpt-oss: high). Ignored while thinking is off. 'model default' sends nothing. |
| reasoning_effort_custom | STRING | Effort value sent when reasoning_effort = custom (e.g. 'high' for gpt-oss). Empty = send nothing. | |
| contextopt | STRING | Reference material appended to the system prompt — e.g. Character Card / Context Collector output. Connect-only (no text field). | |
| visionopt | KINBURG_VISION_CONFIG | Optional vision settings — wire a 'Vision Settings (GGUF)' node here to enable vision (mmproj / handler / downscale). Leave unconnected for text-only. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config | KINBURG_LLM_CONFIG | — |