Nodes/comfyui-ollama-nodes/Pull Model | Ollama Nodes
ComfyUI Node

Pull Model | Ollama Nodes

Pull an Ollama model without ever leaving the node graph

By slyt·Created 2 years ago·Updated 2 years ago· 5
Pull Model | Ollama Nodes
    • output_text
    • model_name
    model_namephi3:latest
    streamfalse

    PullModel is the pack's model-installer. You give it an Ollama model name and it downloads that model from the Ollama library to your local Ollama - the same thing ollama pull llama3 does in a terminal, but as a node with a progress bar. That's the entire job. It doesn't load the model, doesn't generate anything, doesn't need a Hugging Face account or an API key. It just fetches.

    Why you'd reach for it

    Mostly for workflow completeness. The classic pattern is a "bootstrap" pass: run a PullModel node at the start of a shared workflow to guarantee the model exists before GenerateOllama runs. You download someone's workflow, hit run, and instead of a cryptic "model not found" error you get a download bar and then the real work starts. For anyone who shares workflows or sets up fresh installs, that's genuinely useful - it turns model setup from a hidden prerequisite into something the graph handles.

    It's also the manual fix when GenerateOllama complains a model doesn't exist. Instead of dropping to a terminal, change the model name in PullModel, run it, done.

    How it works

    The node calls ollama.pull(model_name, stream=...) against the server at 127.0.0.1:11434. With stream on (the default in practice), it reads the pull progress and drives two indicators: ComfyUI's node progress bar and a tqdm bar in the console log, one bar per model layer. It updates the ComfyUI bar with the bytes completed - which is why big multi-gigabyte pulls visibly tick along instead of looking frozen.

    Inputs:

    • model_name - the Ollama library tag, e.g. phi3:latest (the default) or llava:latest. Tags matter: phi3:latest is a dated alias, so if you want a specific variant, write the full tag.
    • stream - Boolean. true gives you live progress; false just waits and reports when it's done.

    Outputs:

    • output_text - a confirmation string ("Model downloaded successfully").
    • model_name - the model name echoed back, handy if you want to chain it into a GenerateOllama node's model_name input or a prompt template.

    Installing it

    ComfyUI Manager → search "comfyui-ollama-nodes" → Install → restart, or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/slyt/comfyui-ollama-nodes
    cd comfyui-ollama-nodes
    pip install -r requirements.txt
    

    then restart ComfyUI. And because this is an Ollama pack: Ollama itself must be installed and running on the machine ComfyUI runs on (install from ollama.com). The pack assumes a server at 127.0.0.1:11434. If ComfyUI is on a remote box, Ollama has to be reachable from it.

    Troubleshooting

    • Pull fails fast - either Ollama isn't running, or model_name isn't a valid library tag. Verify the exact tag on ollama.com/library before blaming the node.
    • No progress bar, then a surprise success - you left stream off, so it's just a blocking call. Turn stream on if you want to watch it.
    • Big model, small disk - the download streams to Ollama's model store, which sits in your home directory by default. On Windows that's usually fine; on a cramped Linux box, OLLAMA_MODELS is your friend, not this node's problem.

    My take

    It's a helper, not a showpiece, but it's the helper that makes the pack's workflows self-sufficient. Pair it with ListModels - "is it there? no? pull it" - and shared workflows stop dying at the first run. One thing I'd keep in mind: it downloads to Ollama's own store, so the downloaded model is only usable by Ollama, not by ComfyUI's normal model folders. That's a feature, not a bug - it's exactly where GenerateOllama expects it.

    CategoryLLM/Ollama

    Inputs (2)

    NameTypeDefaultDescription
    model_nameSTRINGphi3:latest
    streamBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    output_textSTRING
    model_nameSTRING