Ollama LLM
The 60-line Ollama node that just sends your prompt and hands you back text — no API key required
- STRING
This is the whole pack: one node, one text-in/text-out job, about 60 lines of actual logic. You type a prompt, it gets sent to Ollama, and the reply comes back as a ComfyUI string. No API key, no cloud account, no model download through ComfyUI - the name is honest in a way a lot of "LLM node" names aren't. If your local Ollama server is already up, you can go from install to a working node in under a minute.
Why reach for it at all? The LLM-in-the-graph pattern is mainstream now: a small local model rewrites your rough idea into a structured prompt, and that text feeds the encoder instead of you hand-wringing over it. This node is the plainest possible version of that - no bundled models, no prompt templates, no VRAM juggling. It's a pipe, not a product. If you want the one-shot "ask a local LLM a question and do something with the answer" workflow, this is the simplest honest option on the shelf. Compare that to the multi-provider packs that expose Ollama as one tab among Claude and Grok: those are great, but they're a lot of machinery for a job this small.
How it works
Under the hood it's a thin wrapper over the official ollama-python client. It builds a single user message, calls client.chat(model=..., messages=[...], stream=True), and concatenates the streamed tokens into one string. That's it. Two things follow from that design.
First, it's a single-turn, stateless call. No chat history, no system prompt, no conversation memory - if you need a multi-step exchange you wire several of these together and pass text around yourself. Second, it makes one network call to your local Ollama server (localhost:11434 by default). It does not load the model into ComfyUI's process, which is actually the sane pattern here: you're running two processes (Ollama + ComfyUI) rather than asking a custom node to co-host an LLM on the same GPU as your diffusion model.
The inputs that matter
- prompt - a multiline string. The thing you ask. Defaults to "Hello", which is an excellent way to test that the pipe works before you wire it anywhere.
- model - the model name exactly as Ollama knows it, e.g.
gemma3:4b(the default). Get it wrong and you get an error string, not a fuzzy match. - use_cloud - the one toggle that surprises people. Off by default, which is what you want. Flip it on and the node stops talking to your local server and talks to Ollama's hosted cloud instead, using an
OLLAMA_API_KEYenvironment variable that has to be set in your ComfyUI startup script.
The single output is a STRING. Wire it into a text-preview node to just read the answer, or feed it straight into a positive-prompt / text-encode path if you're using it as a prompt enhancer. For a 4B model doing short structured rewrites, the default gemma3:4b is honestly in the sweet spot the community landed on - small and obedient beats big and chatty for this job.
Installing it
Via ComfyUI Manager, search "ComfyUI-bitpoet-OllamaNode" and hit install. Or, the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/BitPoet/ComfyUI-bitpoet-OllamaNode
Then restart ComfyUI. The pack's requirements.txt is a single line - ollama-python - which Manager installs for you. The part that's not automatic: Ollama itself must be installed, running (ollama serve), and have your model pulled:
ollama pull gemma3:4b
The node never downloads a model file; that's Ollama's job.
Where people get burned
The biggest gotcha is baked into the source: errors are returned as output text, not thrown. If Ollama isn't running, or the model name is wrong, or your cloud key is missing, you get a perfectly valid string that starts with Error:. The workflow doesn't fail - you just end up prompting an image generator with "Error: Connection error...". If your output looks like garbage, check the string before you blame the LLM.
Second, cloud mode requires real setup: sign in at ollama.com, create an API key, and set OLLAMA_API_KEY in whatever script launches ComfyUI - an environment variable in a terminal that started ComfyUI earlier won't be there after a reboot. Third, there's no model auto-fetch, so a fresh install with a typo'd model name fails until you pull the right tag.
It's a new, tiny pack from a hobbyist (the same BitPoet who's active in the r/StableDiffusion LTX-2 video threads), and the comfy.icu install count is basically zero so far. That's worth saying because LLM-adjacent nodes are exactly the category that's been weaponized before - but this one is small, open, and does a single obvious network call to a server you already run. Read the source, then enjoy having the world's least opinionated Ollama node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Hello | — |
| model | STRING | gemma3:4b | — |
| use_cloudopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |