Skip to content
Node packVerifiedExternal
Open source

comfyui-ollama

Maintainer@stavsapCgrade

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

  1. git clone into the custom_nodes folder inside your ComfyUI installation or download as zip and unzip the contents to custom_nodes/compfyui-ollama.
  2. pip install -r requirements.txt
  3. 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:

OSPath to id_ed25519.pub
macOS~/.ollama/id_ed25519.pub
Linux/usr/share/ollama/.ollama/id_ed25519.pub
WindowsC:\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
  • OllamaChat
  • OllamaConnectivityV2
  • OllamaGenerate
  • OllamaGenerateAdvance
  • OllamaGenerateV2
  • OllamaLoadContext
  • OllamaOptionsV2
  • OllamaSaveContext
  • OllamaVision

Related resources

33 connections
Used byAce Step 1.5 XL Turbo and SFT - TEXT to AUDIO model with Ollama — v1.0Used byMekeee_(img2img,txt2img With Lora Model and prompt generator and ControlNet) — v1.0Used byZ-Image Turbo Text-to-Image powered by Ollama 🦙 — Z-Image Turbo WorkflowUsed byLTX-2.3 DEV/DIST - IMAGE to Video and TEXT to Video with Ollama/RTX VSR/LTX-Director — v2.3 LTX-2.3Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v4.1 (QoL)Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v2Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v5Used byWan2.2 FunControl FreeLength V2V with Background Changer (Version 2) — v2.0Used byZimage TURBO llm upscale_2_pass seedVR2 workflow — v1.0Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v3.1 (Hotfix)Used byAce Step 1.5 XL Turbo and SFT - TEXT to AUDIO model with Ollama — v1.7 AceStep 1.5XL (ID3)Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — 20251214Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v6Used byQwen Image generation + upscale (SD1.5, SDXL, WAN2.2) + LLM + Face Detailer — v1.0Used byAce Step 1.5 XL Turbo and SFT - TEXT to AUDIO model with Ollama — v1.2Used byWan 2.1/Multitalk/Chatterbox - Poor Man's Veo 3 — v1.0Used by(Video Tutorial Resources) Kontext, Speed Boosts and updated Loaders — v1.0Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v8.3 — v9.2Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — 20251122Used byAce Step 1.5 XL Turbo and SFT - TEXT to AUDIO model with Ollama — v1.8 AceStep 1.5XL (Lora)Used byCompanion Engine — v1.0 — v2.0Used by(Video Tutorial Resources) Real Flux Skin Textures, PulID V2, Redux and Depth Blur FX — v1.0Used byLTX-2.3 DEV/DIST - IMAGE to Video and TEXT to Video with Ollama/RTX VSR/LTX-Director — v2.6 LTX2.3 DIrectorUsed byAce Step 1.5 XL Turbo and SFT - TEXT to AUDIO model with Ollama — v1.5 AceStep 1.5 XLUsed bySimpler Combined WorkflowUsed byLTX-2.3 DEV/DIST - IMAGE to Video and TEXT to Video with Ollama/RTX VSR/LTX-Director — v1.5 LTX-2Used byMode [Flux,SD3,SDXL,AURA,HYD,SD1,SC] — 0.0Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v3Used byCombined workflow (ComfyUI txt2img, Wildcards, LLMs/Ollama, Pony, SDXL, Illustrious, Flux, Qwen, Z-Image, Anima, Flux 2 Klein, Krea 2 Turbo) — v1Used byLTX-2.3 DEV/DIST - IMAGE to Video and TEXT to Video with Ollama/RTX VSR/LTX-Director — v2.5 LTX-2.3-RTXUsed byCompanion Engine — v1.0Used byLTX-2.3 DEV/DIST - IMAGE to Video and TEXT to Video with Ollama/RTX VSR/LTX-Director — v3.0 LTX 2.5 IT2VUsed byAce Step 1.5 XL Turbo and SFT - TEXT to AUDIO model with Ollama — v1.6 AceStep 1.5XL

Sources

3 sources
GitHubSourceVersion 6db7560576e5a59488708e6be13e07b5aba2432a
github.com/stavsap/comfyui-ollama

Verified Oct 23

GitHubSource
github.com/stavsap/comfyui-ollama

Verified Oct 19

Source excerpts

1 excerpt

Source context: Repo stavsap/comfyui-ollama