Package profile
- Status
- Verified
- Publisher
- @stavsap
- Source
- GitHub
- Stars
- 873
README
ComfyUI Ollama
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.
pic
Installation
1. Install ollama server on the desired host
Download for macOS
Download for Windows
Install on Linux
curl -fsSL https://ollama.com/install.sh | sh
Docker Installation
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
2. Install the custom nodes
Use ComfyUI's built-in extension manager to install the nodes. Search for comfyui-ollama by Stav Sapir.
Or
If you prefer ComfyUI-Manager, search for ollama and select the one by stavsap
pic
Or
- git clone into the
custom_nodesfolder inside your ComfyUI installation or download as zip and unzip the contents tocustom_nodes/compfyui-ollama. pip install -r requirements.txt- Start/restart ComfyUI
Configuration (Ollama Key)
If you are using Ollama Cloud templates that require authentication, you must provide your Ollama public key.
You can do this automatically with the CLI:
ollama signin
Or by manually adding your public key at ollama.com/settings/key.
Your public key is located at:
| OS | Path to id_ed25519.pub |
|---|---|
| macOS | ~/.ollama/id_ed25519.pub |
| Linux | /usr/share/ollama/.ollama/id_ed25519.pub |
| Windows | C:\Users<username>.ollama\id_ed25519.pub |
See Ollama's FAQ for more details.
Nodes
OllamaGenerate
A node that provides ability to set the system prompt and the prompt.
Ability to save context locally in the node enable/disable
Inputs:
- OllamaConnectivity (optional)
- OllamaOptions (optional)
- images (optional)
- context (optional), a context from other OllamaConnectivity
- meta (optional), passing metadata of the OllamaConnectivity and OllamaOptions from other OllamaGenerate node.
Notes:
- For this node to be operational, OllamaConnectivity or meta must be inputted!.
- If images are inputted and a chain of meta usage is made, all the images need to be passed as well to the next OllamaConnectivity nodes.
OllamaChat
A node for conversational interaction using the dedicated Ollama chat endpoint (ollama.chat). It manages the full conversation history natively and allows for chained sequences of chat nodes.
- Functionality: Unlike
OllamaGenerate, this node is designed specifically for multi-turn conversations and cloud models with your Ollama public key (see the Configuration section). - Key Features:
- Conversation history is handled natively within the node instance.
- Dedicated history outputs for *
Nodes in this pack
9 nodes
Nodes in this pack
9 nodes- OllamaChat
- OllamaConnectivityV2
- OllamaGenerate
- OllamaGenerateAdvance
- OllamaGenerateV2
- OllamaLoadContext
- OllamaOptionsV2
- OllamaSaveContext
- OllamaVision
Related resources
33 connections
Related resources
33 connectionsSources
3 sources
Sources
3 sourcesVerified Oct 23
Verified Oct 23
Source excerpts
1 excerpt
Source excerpts
1 excerptSource context: Repo stavsap/comfyui-ollama
