ComfyUI Node
Local LLM Settings (GGUF)
A ComfyUI node in Kinburg-Nodes/LLM with 31 inputs and 1 output.
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)
| 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 | — |