Basic Ollama
Talk to a local LLM from inside ComfyUI — no API key, no cloud
- images
- text
- thinking
The name is honest: Basic Ollama is one node that hands your prompt (and optionally an image) to a local Ollama instance and hands the text back. No API key, no cloud, no account. If you've got Ollama installed, this is the cheapest way to get a real LLM inside your graph for the jobs you don't want to leave ComfyUI for - rewriting a prompt, captioning a batch, brainstorming an img2img description, or adding a system prompt that steers a Wan or LTX video generation. People have been bolting Ollama onto ComfyUI for prompt generation since 2024, and this is a deliberately stripped-down version of that idea: it doesn't try to be a chat client, it just asks a model a question and gives you the string.
How it works
Under the hood it's a thin HTTP client for Ollama's /api/generate endpoint. You give it text, it POSTs to your Ollama URL with stream: False (one response, not a stream), waits - it allows up to ten minutes for slow reasoning models - and returns the response field as the text output. There's no ComfyUI-native dependency at all: it uses aiohttp, torch, and PIL, all of which ship with ComfyUI, so the install has zero pip requirements. The whole pack is one BasicOllama.py plus a prompts folder.
Two details worth knowing. First, it sets keep_alive: "0m", so the model is unloaded right after each call. Great if you're sharing VRAM with your diffusion model, mildly annoying if you're firing off dozens of captioning calls in a row - every one cold-starts. Second, it's registered with the newer ComfyUI extension API (comfy_api.latest, an async entrypoint), which is also why it loads without slowing your browser. That new-style registration is a real compatibility floor: if the node simply doesn't appear after install, update ComfyUI before you start debugging anything else.
The inputs that matter
prompt- the actual question. Multiline, so paste whole captions or instructions in here.ollama_model- the dropdown. It's populated asynchronously from your Ollama instance's/api/tags; hit Refresh to repopulate it after youollama pullsomething new. If it shows "Start Ollama and Refresh", that's the code telling you it can't reach Ollama - start it.enable_think- asks for the reasoning trace and returns it in thethinkingoutput. Useless unless the model is a reasoning model (DeepSeek-R1, Qwen3, that class) that actually returns a thinking field.saved_sys_prompt/use_sys_prompt_below/system_prompt- the three-way system-prompt arrangement. The dropdown reads.txtfiles from the pack'spromptsdirectory (it ships with a set aimed at Flux, Wan, and LTX prompt style); flipuse_sys_prompt_belowand the multiline box takes over for a one-off.generation_seed- passed through as the model's seed. Note LLMs are far looser about seeds than diffusion; it steers, it doesn't reproduce.images- the one genuinely clever bit. It's an autogrow input: connect one image and a second slot appears, up to ten. Anything connected gets tensor → PNG → base64 and sent as theimagespayload, so vision models like llava or Qwen2.5-VL can actually describe what you feed them. Wire thetextoutput into any text input downstream (a prompt field, a Show Text node, a save node);thinkinggoes wherever you want the reasoning trace, or nowhere.
Install
Two options, same result. Through ComfyUI Manager, search for ComfyUI-BasicOllama and install. Or, the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/BobRandomNumber/ComfyUI-BasicOllama.git
Then restart ComfyUI. There are no extra Python packages to install - this is one of those rare packs where the README isn't hiding a heavy dependency. The actual requirement is Ollama itself, which is separate software: grab it from ollama.com, run it, and ollama pull a model (e.g. ollama pull llama3.1 for text, ollama pull llava or qwen2.5vl if you want the image inputs to do anything). Default endpoint is http://localhost:11434; if yours lives elsewhere, edit config.json in the pack folder:
{ "OLLAMA_URL": "http://your-ollama-url:11434" }
Troubleshooting
The failure modes are mostly "Ollama isn't there." The model dropdown reading "Start Ollama and Refresh" means /api/tags didn't answer - start Ollama (or fix config.json), then Refresh. If a run itself fails, the node returns the error as its text output, literally in the format "Connection Error: ... Ensure Ollama is running at http://localhost:11434", so check the Show Text node rather than the console. A model you just pulled won't appear until you refresh the dropdown. And if the node never appears at all, it's the extension API version - update ComfyUI. It's a small pack by a small author, so don't expect a huge ecosystem around it; that's fine, there's not much to break. It's the node you reach for when you want a local LLM in the graph without adopting somebody's 40-node "agent" suite.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The main text prompt for the LLM. | |
| ollama_model | COMBO | Loading... | Select the Ollama model to use. |
| generation_seed | INT | 00–18446744073709550000 | Seed for randomness. Change this to force a new generation. |
| enable_think | BOOLEAN | true | Enable reasoning/thinking for supported models. |
| saved_sys_prompt | COMBO | Z-Image | Select a pre-defined system prompt. |
| use_sys_prompt_below | BOOLEAN | false | If True, use the custom system prompt below instead of the saved one. |
| system_prompt | STRING | Custom system prompt to guide the LLM's behavior. | |
| imagesopt | COMFY_AUTOGROW_V3 | Dynamic image inputs for multimodal models. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | The text generated by the LLM. |
| thinking | STRING | The reasoning trace (if available). |