Nodes/ComfyUI Ollama Model Manager/Ollama Model Selector
ComfyUI Node

Ollama Model Selector

The dropdown that makes the Ollama pack usable

By darth-veitcher·Created 10 months ago·Updated 10 months ago· 2
Ollama Model Selector
  • client
  • client
  • model
  • models_json
model
refreshfalse

Every other node in the ComfyUI Ollama Model Manager pack needs to know which model it's talking to, and Ollama Model Selector is the thing that answers. It's the hub: you connect an Ollama Client's client output to it, and its dropdown fills with every model your local Ollama actually has - no typing model names by hand, no "where does this string come from?" confusion downstream.

The genuinely nice part is when it fills. Connect the client and the model list pops in immediately, before you run anything. That's not magic - the pack registers a backend API route (GET /ollama/models) on ComfyUI's own server, so the dropdown fetches through ComfyUI instead of hitting Ollama directly from the browser. No CORS errors, and the list is cached per endpoint so it isn't hammering Ollama on every reconnect.

The inputs and outputs that matter

  • client (required) - the OLLAMA_CLIENT connection. Until this is wired, the dropdown just shows the placeholder <connect client to fetch>.
  • model (required) - the dropdown itself, populated from the cache.
  • refresh (optional) - a boolean, default false. Flip it to true if you pulled a new model in Ollama and want the list to force-refetch on the next run instead of relying on the cache.

Outputs: client (passed through so the chain keeps going), model (the STRING name you selected - this is what feeds Load, Chat, and Unload nodes), and models_json (the full model list as a JSON string, if you want something else to consume it).

Installing it

One install for the whole pack: ComfyUI Manager → search "Ollama Manager" → Install → restart, or git clone https://github.com/darth-veitcher/comfyui-ollama-model-manager into ComfyUI/custom_nodes and run python install.py. It auto-installs httpx, loguru, and rich (Python 3.12+ required). No models ship with the pack - you pull them in Ollama (ollama pull llama3.2) and they appear here.

Where people get burned

This is where most beginners hit the wall, and it's almost never the node's fault. If the dropdown stays empty or a downstream node complains "Available models: []", check in this order: is Ollama running (curl http://localhost:11434/api/tags), is it the right endpoint (the client defaults to http://localhost:11434, and your Ollama must be on that port or you set the endpoint accordingly), and have you actually pulled a model (ollama list). One quirk to know: the selector's IS_CHANGED logic re-runs whenever the cached model list changes, so if you pulled a new model mid-session, re-running the workflow (or toggling refresh) is what picks it up.

CategoryOllama

Inputs (3)

NameTypeDefaultDescription
clientOLLAMA_CLIENT
modelCOMBO1 options: <connect client to fetch>
refreshoptBOOLEANfalse

Outputs (3)

NameTypeDescription
clientOLLAMA_CLIENT
modelSTRING
models_jsonSTRING