Nodes/Kinburg-Nodes/Local LLM Settings (GGUF)
ComfyUI Node

Local LLM Settings (GGUF)

A ComfyUI node in Kinburg-Nodes/LLM with 31 inputs and 1 output.

By Kinburg·Created 2 months ago·Updated 3 days ago· 1
Local LLM Settings (GGUF)
  • vision
  • config
model
model_path
system_promptYou are a helpful assistant.
max_tokens512
temperature0.70
top_p0.95
top_k40
min_p0.00
repeat_penalty1.10
stop
n_ctx4096
n_gpu_layers-1
n_batch512
flash_attnfalse
kv_cache_typef16
seed0
unload_comfy_modelstrue
unload_llm_after_runfalse
strip_thinktrue
answer_marker
thinking_directivemodel default
custom_directive
output_formattext
grammar
extra_load_args
chat_template_path
enable_thinkingmodel default
reasoning_effortmodel default
reasoning_effort_custom
context
CategoryKinburg-Nodes/LLM

Inputs (31)

NameTypeDefaultDescription
modelCOMBOPick 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_pathSTRINGFull path to a .gguf, used when 'model' is the placeholder. Surrounding quotes (e.g. from Windows 'Copy as path') are stripped automatically.
system_promptSTRINGYou are a helpful assistant.
max_tokensINT51216–32768
temperatureFLOAT0.700–2
top_pFLOAT0.950–1
top_kINT400–32768
min_pFLOAT0.000–1Min-p sampling. 0 = off. Try ~0.05 (often paired with top_p=1.0, top_k=0)
repeat_penaltyFLOAT1.101–2
stopSTRINGStop strings, one per line. Generation stops as soon as any is produced
n_ctxINT4096256–1048576
n_gpu_layersINT-1-1–1000-1 = all layers on GPU, 0 = all on CPU
n_batchINT51232–8192
flash_attnBOOLEANfalseFlash Attention: faster and a smaller KV cache (less VRAM)
kv_cache_typeCOMBOf16Quantize the KV cache to fit a bigger context in VRAM. q8_0/q4_0 auto-enable Flash Attention
seedINT0-1–18446744073709550000
unload_comfy_modelsBOOLEANtrueUnload ComfyUI (image) models from VRAM before running the LLM
unload_llm_after_runBOOLEANfalseFree 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_thinkBOOLEANtrueKeep reasoning out of the 'text' output (it still goes to the 'thoughts' output). Off = leave raw reasoning in 'text'
answer_markerSTRINGFor 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_directiveCOMBOmodel defaultAppend 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_directiveSTRINGDirective text appended to the prompt when thinking_directive = custom (e.g. /no_think)
output_formatCOMBOtextOutput: free text · valid JSON · custom GBNF grammar (field below) · ideogram4_json. Grammar modes run without the live progress bar
grammarSTRINGGBNF grammar text, used when output_format = gbnf_grammar
extra_load_argsSTRINGAdvanced: 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_pathSTRINGAdvanced: 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_thinkingCOMBOmodel defaultReasoning 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_effortCOMBOmodel defaultHow 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_customSTRINGEffort value sent when reasoning_effort = custom (e.g. 'high' for gpt-oss). Empty = send nothing.
contextoptSTRINGReference material appended to the system prompt — e.g. Character Card / Context Collector output. Connect-only (no text field).
visionoptKINBURG_VISION_CONFIGOptional vision settings — wire a 'Vision Settings (GGUF)' node here to enable vision (mmproj / handler / downscale). Leave unconnected for text-only.

Outputs (1)

NameTypeDescription
configKINBURG_LLM_CONFIG