Ollama Connective
The 'connective' that just pings your local Ollama
- connection
- models_text
OllamaConnective is the handshake node for the pilcothink pack's Ollama side, and the name is doing a lot of work for very little ceremony. You give it the address of a running Ollama server, it asks that server what models it has, and it packages the answer into an OLLAMA_CONNECTION object plus a readable text summary. That's the whole job. No API key required, no remote service, no cloud - just your local Ollama daemon.
If you're not familiar: Ollama is the tool that turns "run a local LLM" into a single ollama run command, and it's become the default way people get models like Llama, Qwen, or Gemma onto their own machine. In a ComfyUI context, Ollama-based nodes are a well-worn path for prompt enhancement and text work - plenty of people run their prompt-expansion model through exactly this kind of local endpoint rather than paying for a cloud LLM.
How it works
On execution it hits GET <base_url>/api/tags with a short timeout. Ollama returns its installed models; the node lists them, and if you left model empty it picks the first one automatically. If you typed a model name that isn't installed, it errors out and tells you exactly what is available. Everything it learned goes into a dataclass - base URL, optional auth, the chosen model, the full model list - which travels over the connection output.
The inputs that matter
- base_url - default
http://127.0.0.1:11434. Only change this if Ollama runs elsewhere (another machine, a different port). - api_key - default
EMPTY. The default means "no auth header at all," which is correct for a plain local Ollama install. Fill it in only if your server is behind something that wants a bearer token. - model - optional. Leave blank to auto-pick the first model the server reports.
Two outputs: connection (the OLLAMA_CONNECTION that feeds the generator) and models_text, a STRING showing the selected model and the full list - handy to wire into a display node so you can see what you're talking to.
Install
Part of the comfyui_pilcothink_VisionSLM pack:
cd ComfyUI/custom_nodes
git clone https://github.com/gpdev-Pilcothink/comfyui_pilcothink_VisionSLM
Restart, or install via ComfyUI Manager (search comfyui_pilcothink_VisionSLM). The Ollama nodes only need requests to talk HTTP - but they come bundled with the whole pack, so you're also installing the heavy model stack whether you use it or not.
Gotchas
The most common failure is boring: Ollama isn't actually running, or it is but the model you named isn't pulled. Check ollama serve is up, and run ollama pull <model> first - the error message will name the missing model, which is nicer than most. One trap: the node expects the plain Ollama server, not an OpenAI-compatibility layer. Ollama's /api/tags is Ollama-specific, so don't point base_url at some other OpenAI-style proxy and expect it to work. And it's a brand-new pack with no community mileage, so install from the official repo only.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| base_url | STRING | http://127.0.0.1:11434 | — |
| api_key | STRING | EMPTY | — |
| model | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| connection | OLLAMA_CONNECTION | — |
| models_text | STRING | — |