Nodes/ComfyUi-Ollama-YN/My Ollama Delete Model
ComfyUI Node

My Ollama Delete Model

Clean up Ollama models without leaving ComfyUI

By wujm424606·Created 2 years ago·Updated 2 years ago· 84
My Ollama Delete Model
    • description
    urlhttp://127.0.0.1:11434
    model

    MyOllamaDeleteModel is the housekeeping node in the ComfyUi-Ollama-YN pack. Ollama models are big - multi-gigabyte - and if you've been testing a bunch of them through the pack's extra_model auto-download, your disk fills up fast. This node deletes a downloaded model and, just as importantly, removes it from the pack's file/category.csv so it stops cluttering every dropdown in the pack.

    Honestly, you could do the same thing in a terminal with ollama rm. The point of this node is convenience: it's one click inside your graph, and it keeps the CSV that drives every model dropdown in sync. If you never delete models, you'll never use this node. If you do, it beats remembering the CLI command.

    How it works

    It's deliberately tiny. You pick a model from the dropdown and hit run; the node calls ollama delete through the ollama Python client and strips the entry out of category.csv at the same time. The dropdown only lists models the pack already knows about (they're tagged (vision) or (text) in the list based on which CSV column they live in), which is exactly the set you'd want to clean up.

    The single output is named description but it's really the status string Ollama's delete call returns - a confirmation that the deletion went through.

    The inputs

    • model - the dropdown. Only models already tracked by the pack show up here, so if you pulled something manually with ollama pull in a terminal it won't appear until you add it to the CSV.
    • url - the Ollama server address, default http://127.0.0.1:11434. Only touch it if your Ollama isn't on localhost.

    That's the whole node. There's no extra_model field here - you can't delete something the pack doesn't know about - and no confirm dialog, so make sure you've picked the right model before you run it. Deleting is not recoverable; Ollama will just re-download it if you ever want it back.

    Installing it

    Same pack, shared install. ComfyUI Manager (search "ComfyUi-Ollama-YN"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wujm424606/ComfyUi-Ollama-YN.git
    # restart ComfyUI
    

    Dependencies are ollama, pandas, and aiohttp; pandas is what actually rewrites the CSV. Ollama itself needs to be running, since the delete goes through the local server. The pack has been dormant since September 2024, but a node this thin has almost nothing to go stale.

    Where people get burned

    Two things. First, if the dropdown looks empty, Ollama probably isn't running - the model list is fetched live from the server. Second, this node only sees models the pack already tracks. If you want to delete a model you installed outside the pack, add it to category.csv (text or vision column depending on what it does), restart ComfyUI so it shows in the dropdown, and then delete it from here. That extra step trips people up because the node looks like it should show all your models; it doesn't.

    CategoryMy Ollama

    Inputs (2)

    NameTypeDefaultDescription
    urlSTRINGhttp://127.0.0.1:11434
    modelCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    descriptionSTRING