ComfyUI-llamacpp-helper Introduction
ComfyUI-llamacpp-helper lets you use a local llama.cpp language model inside a ComfyUI workflow. You can ask the model to write or revise text, and, with a compatible multimodal model, provide an image, audio, or video as input.
The extension runs llama-server as a separate process rather than loading the language model into ComfyUI. This makes it useful when you want to add language-model steps to a creative workflow without keeping the model in memory after generation. By default, the extension starts the server when needed and stops it when generation finishes, releasing the memory used by that server. It also does not require extra Python packages in ComfyUI, such as llama_cpp_python.
How ComfyUI-llamacpp-helper Works
Think of ComfyUI as your workspace and llama-server as a separate assistant. ComfyUI sends your prompt and any connected inputs to the server through a local HTTP request. The server runs the model and sends the response back to your workflow. ComfyUI itself does not load the language model.
A typical workflow has two main steps:
- Choose the model: Use Load llama.cpp Model to point to the
llama-serverexecutable and a.ggufmodel file. - Generate a response: Connect that node to LLM (llama.cpp server), enter a prompt, and queue the workflow. The generation node returns
textandreasoningoutputs.
With auto_start enabled, the server launches when it is first needed. With release_after_use enabled, it stops after generation. If you queue the workflow again, auto_start can launch it again. This default behavior helps avoid leaving the server’s GPU and system memory occupied between runs.
For example, you could enter a text request asking for variations of a scene description. If your chosen model supports image input and you provide its matching multimodal projector, you could also connect an image and ask about what it contains.
ComfyUI-llamacpp-helper Features
- Model and server controls — Load llama.cpp Model: Select the
server_exeexecutable andmodel_path.gguffile. You can also set the server’shostandport,context_size, andn_gpu_layers, which controls GPU-layer use. For a compatible multimodal model,mmproj_pathpoints to its matching.ggufprojector. - Text generation — LLM (llama.cpp server): Write a
promptand, optionally, asystem_promptfor instructions that guide the response. The node also acceptshistoryfor prior conversation context and provides separatetextandreasoningoutputs. - Response controls:
temperature,top_p, andtop_kadjust how the model samples its response; changing them can make responses feel more varied or more constrained.max_tokenslimits response length,repeat_penaltyaffects repetition, andseedgives you another way to control sampling. Results still depend on the model and prompt you choose. - Image, audio, and video inputs: Connect supported media to the generation node when you want the model to respond to more than text. These inputs require both a model that supports the relevant media and a matching
mmprojfile. Connecting media to a text-only model is not enough to give it multimodal abilities. - Skills — Load llama.cpp Skill: Load a skill directory containing
SKILL.mdand text or media files. The extension injects the skill as a system prompt, letting you provide reusable guidance to the model. - Server lifecycle controls:
auto_startlaunches the server when needed;release_after_usestops it after generation and is enabled by default. If you need to stop a server yourself, use Stop llama.cpp server for the specified port.
ComfyUI-llamacpp-helper Models
The extension does not include a fixed list of models. You choose a local GGUF model supported by llama-server. A text-capable model can handle text prompts; image, audio, or video input additionally requires a model with the corresponding multimodal support and a matching GGUF mmproj file.
Your model choice affects what the workflow can accept and the responses it produces. For instance, choosing a text-only model is suitable for writing a description, while asking a model about a connected image requires compatible multimodal files. llama-server cannot load a safetensors model directly.
Model and projector dropdowns look for .gguf files in the directories configured in the extension’s config.json. Its default paths include ComfyUI’s models/text_encoders and models/LLM directories, along with an example path. If your files live elsewhere, update model_roots and mmproj_roots to match their actual directories. You can also paste a full file path if a dropdown has no matching entry.
Troubleshooting ComfyUI-llamacpp-helper
My model does not appear in the dropdown. What should I check?
- Confirm that the model file ends in
.gguf. - Open the extension’s
config.jsonand check thatmodel_rootspoints to the directory containing the file. - If you are looking for a projector, check
mmproj_rootsinstead. - If the file still does not appear, paste its full path into the relevant field.
The workflow cannot use my model. Can I select a safetensors file?
No. Select a GGUF model instead: llama-server cannot load safetensors directly. Also check that server_exe points to your llama.cpp server executable. The author links to llama.cpp releases as a source for llama.cpp.
Why is my image, audio, or video input not working?
Check that your chosen model supports that type of input, then provide its matching .gguf file in mmproj_path. Both are needed for multimodal use; the extension cannot add media support to an incompatible model.
Why does the server start again each time I run the workflow?
That is expected with the default lifecycle settings. release_after_use stops the server after generation to free its memory, and auto_start launches it again for the next run. You can change these settings in the generation node if you do not want that behavior.
How do I stop a server manually?
Use Stop llama.cpp server and specify the port used by the server you want to stop.
Why is my skill not available?
Check that skill_roots in config.json points to the directory where your skill folders are stored, and that the skill directory contains SKILL.md.
Learn More about ComfyUI-llamacpp-helper
- llama.cpp — learn about the local model server that this extension uses.
- llama.cpp releases — find the llama.cpp downloads referenced by the author.
