Load LLM Model Basic
The node every ComfyUI-Llama workflow starts with
- LLM
This is the on-ramp for the whole pack. ComfyUI-Llama is, at heart, a glue layer: it takes llama.cpp's GGUF model files - the same quantized .gguf weights you already know from Flux-era quantization, where Q8 is basically fp16 at half the size and Q4_K_M is the accepted compromise when VRAM is tight - and loads them inside ComfyUI so a text model can live in the same graph as your image model. And every graph starts here, at Load LLM Model Basic.
The name is honest about what it is: it's a simplified wrapper around llama-cpp-python's Llama.__init__. You pick a file, optionally set a context size, and get an LLM object out the right side. That LLM wire is worth knowing about: it's a custom type only this pack understands, so it plugs into Call LLM nodes, the tokenizer/sampler helpers, and nothing else. Don't expect to feed it into a standard ComfyUI node - that's by design, and it's how the pack keeps you from miswiring a language model into a CLIP input.
The inputs that matter
The schema is almost insultingly small:
- Model - a dropdown populated at runtime from the
.gguffiles inComfyUI/custom_nodes/ComfyUI-Llama/models. Drop your GGUF in there (you can rename the file, the author notes, and the dropdown will show the new name). No dropdown entries at all usually means the folder is empty or ComfyUI hasn't rescanning yet. - n_ctx - the context window in tokens. Default 0 means "the model's own default"; the step of 512 is a hint that you'll mostly move it in half-thousand-token chunks. Bigger context eats more RAM, so don't max it out "just in case."
That's the whole input list. The single output is LLM, which you wire into a Call LLM Basic or Advanced node.
Installing the thing
The pack installs like any other custom node - either through ComfyUI Manager (search "ComfyUI-Llama" on the Install Custom Nodes page) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/daniel-lewis-ab/ComfyUI-Llama
Manual installs also need pip install llama-cpp-python. The heavier step is the model: there's no built-in downloader, so grab a GGUF from HuggingFace (small models like Llama-3.2-1B are fine to start) and drop it in the models folder above. Then restart ComfyUI and hit Ctrl+F5 to hard-refresh the browser - a normal refresh regularly misses new node menus. Your nodes land under the LLM menu.
Where people get burned
The most common failure is a model that never appears in the dropdown, which is almost always the file being in the wrong folder or the browser cache lying to you. The Ctrl+F5 is not optional. The second classic is an n_ctx that's too ambitious for your RAM - GGUF quantized models are small on disk but the context buffer is not free, and setting 32k on an 8GB machine is a crash with a confusing traceback. Start conservative, then grow it.
Also set expectations: this pack is old and lean, and the broader community has mostly drifted to newer, more polished "LLM in ComfyUI" nodes. What it still offers is the simplest possible path to text generation in a graph, and this loader is the whole point of it. If you want the training wheels off, Load LLM Model Advanced is the same idea with every llama.cpp knob exposed.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| Model | COMBO | 0 options: | |
| n_ctxopt | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LLM | LLM | — |