Griptape Util: Remove Ollama Model
Clean house on Ollama without leaving ComfyUI
- OUTPUT
The Griptape Util: Remove Ollama Model node is a housekeeping tool, and it says so right in its description: "Ollama can sometimes be overrun with models. This node allows you to remove a model by name." If you run local LLMs through Ollama for your Griptape agents - and it's a popular choice, since it keeps your agent brain off the cloud - you'll eventually accumulate a pile of downloaded models eating your disk. This node deletes one from inside a ComfyUI graph, no terminal required.
It's a small thing, but it's the kind of small thing that saves you from breaking flow mid-workflow. Testing a bunch of local models to find the one that fits your VRAM? Run this node on the losers, right there in the same graph where you tested them. It's also a nice demonstration that the Griptape pack cares about the Ollama side of the house - the README treats Ollama as a first-class citizen for local agents.
How it works
The mechanism is refreshingly blunt: the node runs ollama rm <model> via a subprocess and returns the output as a string. That's it. No framework involved, no API. The model dropdown is populated at run time from ollama list, so the choices reflect what's actually on your machine - and if Ollama isn't running, the list comes back empty and the node can't populate its options.
Before it does anything, the node validates that the ollama CLI is installed at all; if it isn't, the node refuses with "You must have ollama installed on your machine to use this node." The output is cleaned up for display - layer hashes are pulled out and formatted so you can see what was actually removed.
Inputs and outputs
- base_url - where your Ollama server lives, default
http://127.0.0.1. Local default is almost always right. - port - the Ollama port, default
11434(Ollama's standard). - model - the model to remove, chosen from the dropdown of installed models.
- OUTPUT -
STRING, the result of the removal (which layers were deleted, errors if any).
It's an output node, so it renders as a terminal display showing what happened.
Install
Same pack as the rest - ComfyUI Manager (search "Griptape") or:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
The pack's requirements.txt installs griptape[all], python-dotenv, and an openai pin. Separately, you need Ollama installed and running on the machine (see ollama.com); ollama run llama3 (or whatever model) is the README's own getting-started step.
Common gotchas
Three things trip people up. First, this deletes, permanently - there's no undo, and if you remove a model you'll have to re-pull it. Second, the node validates the CLI but still talks to the server over base_url/port; if you run Ollama on a different machine or port, change both or the removal silently fails. Third, the model dropdown only fills when Ollama is actually running - if the list is empty, that's your server, not a bug in the node. And on the shared-GPU note from the community: running Ollama and ComfyUI on one card can deadlock on VRAM, so it's worth keeping a keep_alive policy for Ollama models you're not actively using.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| base_url | STRING | http://127.0.0.1 | The base URL of the Ollama server |
| port | STRING | 11434 | The port of the Ollama server |
| model | COMBO | The model to remove |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OUTPUT | STRING | — |