Nodes/Simple LlamaCPP Client/🦙 Llama.cpp Model Selector
ComfyUI Node

🦙 Llama.cpp Model Selector

The tiny node that stops you hand-typing GGUF model IDs

By ai-joe-git·Created 7 months ago·Updated 2 months ago· 4
🦙 Llama.cpp Model Selector
    • model_name
    â—„server_urlhttp://127.0.0.1:8888â–º
    â—„modelâ–º

    This node doesn't generate anything. That's the whole point. The LlamaCppModelSelector is the helper half of the Simple LlamaCPP Client pack - a string passthrough with one genuinely useful trick bolted on: a Fetch Models button that pulls the live model list from your llama.cpp server so you never have to remember an exact GGUF filename again.

    Why it exists

    Its sibling, the LlamaCppRouterClient, needs a model name before it can talk to a llama.cpp server. You can just type qwen2.5-7b-instruct-q4_k_m.gguf into the model field by hand. But typo one character and you get an error, and if you're juggling three client nodes against the same server, you're now maintaining that string in three places. The selector fixes both: pick once from a dropdown that's fed by the server itself, and route the same model_name string to every client node that needs it.

    It also gives you a visual check on what the server actually has loaded, which is a lot nicer than guessing.

    How it works

    The node is a shell - its Python side literally just returns the model widget's value. The real machinery is in the pack's frontend. A Fetch Models button calls a backend route the pack registers on ComfyUI's server (/llamacpp/models), which proxies to your llama.cpp server's /models endpoint and returns each model's id, load status (loaded / loading / not loaded), and input modalities. Click the button, a picker pops up showing 🟢 qwen2.5-7b-instruct.gguf [image]-style entries, and clicking one writes the id into the model widget. Clean, zero free-text.

    Because the GGUF itself lives on the llama.cpp server (this pack never touches model files), the picker only knows what your server is advertising.

    The inputs and output

    Only two inputs, both simple:

    • server_url - your llama.cpp server's base URL. Default is http://127.0.0.1:8888, but whatever port you launched llama-server on is the one that goes here. This is the field the Fetch Models button reads.
    • model - empty by default; the tooltip says it plainly: click Fetch Models button to pick from the server.

    The single output is model_name (STRING), wired straight into the model input of a LlamaCppRouterClient. You can also run it into multiple clients, a Show Text node to see what's selected, or anything else that accepts a string.

    Install

    Same as the whole pack - ComfyUI Manager (search "Simple LlamaCPP Client") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ai-joe-git/ComfyUI-Simple-LlamaCPP-Client.git
    

    Restart ComfyUI. The only Python deps are requests and pillow, both almost certainly already in your ComfyUI venv, and there are no models to download on the ComfyUI side - the heavy GGUF files live on your llama.cpp server.

    Gotchas

    The default port is the big one: the node ships with 8888, llama.cpp's stock server port is 8080, and the pack's own README example uses 8082. If Fetch Models just toasts an error, your server_url and your llama-server --port don't match - fix the field to match the server. And remember this node is convenience, not necessity: if you're on a one-model setup you can skip it entirely and type the id into the client. But once you're managing more than one model, it earns its place in the graph.

    CategoryLLM / Simple llama.cpp

    Inputs (2)

    NameTypeDefaultDescription
    server_urlSTRINGhttp://127.0.0.1:8888llama.cpp server base URL
    modelSTRINGModel name — click Fetch Models button to pick from the server

    Outputs (1)

    NameTypeDescription
    model_nameSTRINGSelected model name to wire to LlamaCppRouterClient