Custom ComfyUI Nodes for interacting with a/Ollama using the a/ollama python client. Integrate the power of LLMs into CompfyUI workflows easily.
Custom ComfyUI Nodes for interacting with Ollama using the ollama python client.
Integrate the power of LLMs into ComfyUI workflows easily or just experiment with LLM inference.
To use this properly, you would need a running Ollama server reachable from the host that is running ComfyUI.
<a href="https://www.buymeacoffee.com/stavsapq" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="40" width="174"></a>
Install ollama server on the desired host
<a href="https://ollama.com/" target="_blank"> <img src="https://img.shields.io/badge/v0.4.2-green.svg?style=for-the-badge&labelColor=gray&label=Ollama&color=blue" alt=""/> </a><a href="https://ollama.com/download/Ollama-darwin.zip" target="_blank">Download for macOS</a>
<a href="https://ollama.com/download/OllamaSetup.exe" target="_blank">Download for Windows</a>
Install on Linux
curl -fsSL https://ollama.com/install.sh | sh
<a href="https://hub.docker.com/r/ollama/ollama" target="_blank">Docker Installation</a>
CPU only
docker run -d -p 11434:11434 -v ollama:/root/.ollama --name ollama ollama/ollama
NVIDIA GPU
docker run -d -p 11434:11434 --gpus=all -v ollama:/root/.ollama --name ollama ollama/ollama
Use the compfyui manager "Custom Node Manager":
Search ollama
and select the one by stavsap
Or
custom_nodes
folder inside your ComfyUI installation or download as zip and unzip the contents to custom_nodes/compfyui-ollama
.pip install -r requirements.txt
A node that gives an ability to query input images.
A model name should be model with Vision abilities, for example: https://ollama.com/library/llava.
A node that gives an ability to query an LLM via given prompt.
A node that gives an ability to query an LLM via given prompt with fine tune parameters and an ability to preserve context for generate chaining.
Check ollama api docs to get info on the parameters.
More params info
Consider the following workflow of vision an image, and perform additional text processing with desired LLM. In the OllamaGenerate node set the prompt as input.
The custom Text Nodes in the examples can be found here: https://github.com/pythongosssss/ComfyUI-Custom-Scripts