DavchaLLMAdvanced
The local LLM node with actual sampling knobs
- model
- text
The sibling node DavchaLLM gives you a local chat call with fixed settings. This one is the version you actually want when the task is anything beyond a single shot at default temperature: it adds a system prompt and exposes the full sampling dials - max tokens, temperature, top_p, top_k and repeat penalty. Prompt enrichment, tag generation, translation, structured rewrites - this is the node that makes them work.
It's from comfyui_davcha, the author's "personal QoL and experimental nodes" pack, and it's the one LLM node that was never renamed to "Old" - a small hint that this is the one kept around.
How it works
Same machinery as its sibling: llama.cpp through llama-cpp-python. It builds a message list - an optional system message followed by your user text - calls create_chat_completion with your parameters, and returns the assistant's reply as a STRING. The seed goes through model.set_seed(seed), so the same seed and text gives you the same output for a given model.
The dials, in the order you'll actually touch them:
- system (multiline) - the instruction that shapes behavior. "You are a tag generator that only outputs comma-separated danbooru tags" is the classic use.
- max_tokens (1–8192, default 512) - reply length cap. Bump it for summaries, not for tag lists.
- temperature (0–1, default 1.0) - randomness. Note the cap at 1.0: llama.cpp supports higher, this node doesn't let you.
- top_p (0–1, default 0.9) and top_k (0–100, default 50) - nucleus and top-k sampling.
- repeat_penalty (0–5, default 1.2) - suppresses repetition; raise it if the model loops.
Inputs: model (from the pack's LLM loader), seed, and the above. Output: text (STRING).
Installing it
# ComfyUI Manager → Install Custom Nodes → search "comfyui_davcha" → Install → Restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/dchatel/comfyui_davcha
cd comfyui_davcha
pip install -r requirements.txt
The pack's big catch lands squarely on this family of nodes: nodes.py imports from llama_cpp import Llama at module load, but llama-cpp-python is not in requirements.txt. Without it the whole pack fails to import. pip install llama-cpp-python opencv-python and restart. You also need a GGUF in ComfyUI/models/llm_gguf/ or the loader's dropdown will be empty.
Where people get burned
Two things. First, the temperature ceiling at 1.0 means you can't do the "creative" hot sampling some workflows want - if your output feels flat at 1.0, that's the wall. Second, context is fixed at 2048 tokens by the loader, so long system prompts plus long inputs can quietly clip the reply; keep the system prompt lean. And as always with local LLMs, quantization quality is the real variable - Q4_K_M is the compromise tier, Q8 basically free of loss if you have the VRAM.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | DavchaLLModel | — | |
| seed | INT | 00–18446744073709550000 | — |
| system | STRING | — | |
| text | STRING | — | |
| max_tokens | INT | 5121–8192 | — |
| temperature | FLOAT | 1.00–1 | — |
| top_p | FLOAT | 0.90–1 | — |
| top_k | INT | 500–100 | — |
| repeat_penalty | FLOAT | 1.20–5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |