Nodes/ComfyUI-Prompt-MZ/MinusZone - ModelConfigManualSelect(OllamaFile)
ComfyUI Node

MinusZone - ModelConfigManualSelect(OllamaFile)

Run your prompt beautifier on an Ollama model you already have

By MinusZoneAI·Created 2 years ago·Updated about a year ago· 138
MinusZone - ModelConfigManualSelect(OllamaFile)
    • llama_cpp_model_config
    ollama
    chat_formatauto

    If you already run Ollama for local LLM stuff, ModelConfigManualSelect(OllamaFile) is the node that says "sure, use that model, no re-download." It scans your local Ollama install, lists the models you've pulled, and hands the underlying model file to the pack's CLIPTextEncode(LLamaCPP Universal) node so it can beautify prompts with a model you already own and love.

    This is a genuinely clever trick when you look at what it's doing. Ollama stores models as Docker-style manifests with content-addressed blobs. This node walks ~/.ollama/models/manifests (or %APPDATA%\.ollama\models on Windows), reads each manifest, finds the layer with application/vnd.ollama.image.model, resolves its sha256: digest to the actual blob file in ~/.ollama/models/blobs/, and hands that blob path to llama.cpp - which can load it because an Ollama model blob is a GGUF file with some different metadata. Ollama runs on llama.cpp under the hood, so the format interop is real.

    The two inputs

    • ollama - dropdown of every model manifest found on disk, listed by path. Populated at node-load; if you've pulled a new model, refresh the node to see it.
    • chat_format - auto plus the llama.cpp chat handlers. auto is right almost always; Ollama's own templates usually map cleanly.

    Output is a llama_cpp_model_config, which plugs straight into the llama_cpp_model input on the universal text-encode node - same type as the other model-config nodes, so you can swap them freely.

    The honest caveats

    First, this node does not talk to the Ollama server. No network, no ollama API, no daemon needed - it reads files directly and runs the model through llama.cpp itself. If the Ollama daemon is holding the blob, you may get a file-lock or memory-double-load situation; quit Ollama while the ComfyUI node runs, or you're paying RAM twice.

    Second, the dropdown lists raw manifest paths, not friendly names like "llama3.1:8b". You'll be picking between .../manifests/registry.ollama.ai/library/llama3/8b-style entries. Fine once you know the layout.

    Third, the model must be a text model. There's no mmproj handling here, so vision models like llava won't work through this config node - that's what the ImageInterrogator config nodes are for.

    Installing

    Part of ComfyUI-Prompt-MZ - ComfyUI Manager, search "ComfyUI-Prompt-MZ", or clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MinusZoneAI/ComfyUI-Prompt-MZ
    

    Needs llama-cpp-python and diskcache (requirements.txt) plus an existing Ollama models directory. If you've never installed Ollama, this node's list is empty - go grab it from ollama.com first.

    Troubleshooting

    The Invalid ollama file error means the picked manifest couldn't be parsed for a model layer - usually a corrupt manifest or a model type the pack can't interpret. The Model not found at: error means the blob file behind the digest is missing (partial ollama pull). Re-pull the model. And since the node feeds llama.cpp directly, all the standard pack gotchas apply: stale llama-cpp-python throws LLAMA_SPLIT_MODE_LAYER, and a CUDA mismatch throws the LLama.dll load error - both covered in the README FAQ, both fixed by upgrading the pip package / switching PyTorch to CUDA 12.1.

    CategoryMinusZone - Prompt/others

    Inputs (2)

    NameTypeDefaultDescription
    ollamaCOMBO0 options:
    chat_formatCOMBOauto28 options: auto, llama-2, llama-3, alpaca, qwen, vicuna, +22

    Outputs (1)

    NameTypeDescription
    llama_cpp_model_configLLamaCPPModelConfig