Ai_Ollama_RunModel
Make sure your local Ollama service is actually up first
- status
This node does one thing, and it's a boring but genuinely useful thing: it checks whether Ollama's local service is running and, per its name, can start it if it isn't. Put it before AI_Ollama_text or AI_Ollama_image in a graph and you get a clean, visible failure right at this node if Ollama isn't up, instead of a confusing timeout three nodes later from the actual chat node trying and failing to reach localhost and nobody having a clear reason why.
There's almost nothing to configure. enable_service (boolean, required, default true) is the switch - leave it on and the node handles making sure the service is available. The one optional field, timeout (5–30 seconds, default 20), caps how long it'll wait for the service to respond before giving up. The single output, status, is a plain-text result you can inspect (or route into a Show Text node) to see what actually happened.
Where this genuinely earns a spot in your graph: Ollama doesn't always auto-start on boot depending on how you installed it, and if you've stepped away and your machine slept or the Ollama process crashed silently, the first sign is usually a vague error from whichever chat node tried to use it. Running this node first turns that into an explicit, readable status message before you've spent any time debugging the wrong node.
It's also worth putting this ahead of every Ollama-dependent node in a batch workflow, not just the first one - if you're chaining AI_Ollama_text and AI_Ollama_image back to back to build, say, a caption-then-describe pipeline, one shared Ai_Ollama_RunModel gate at the front means a dead service fails the whole run immediately instead of burning through half your batch before the second node hits the same wall the first one would have caught.
Installing it: through ComfyUI Manager (search "ComfyUI-Apt_Preset") or manually - cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset, then install.bat and restart. This node itself needs no separate download, but it's only useful once Ollama proper is installed on your machine (from ollama.com or your package manager) - this node checks and nudges the service, it doesn't install Ollama for you.
Troubleshooting: if status keeps reporting the service as unavailable even after you've confirmed Ollama is installed, try starting it manually from a terminal (ollama serve, or just running any ollama run <model> command) and see if that resolves it - some installs need the app opened at least once, or the service started explicitly, before it'll respond on its default port. If it's intermittently flaky, bumping timeout up from the 20s default gives a slower-to-wake service more room before this node gives up and reports failure.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| enable_service | BOOLEAN | true | — |
| timeoutopt | INT | 205–30 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |