Ollama LLM Loader (TJ)
Ollama LLM Loader (TJ)
- image
- response
- thought_process
- raw_response
Here's the pitch that sells this node: the name is mostly a lie. It doesn't "load" a model at all - Ollama LLM Loader (TJ) is just a polite client for the Ollama server already running on your machine. No API key, no GGUF files to hunt down, no llama-cpp-python GPU build. If Ollama is up, this node talks to it. That makes it the cheapest on-ramp into LLM-assisted prompting in the whole TJ_NODE pack, and honestly one of the least fiddly local-LLM nodes anywhere.
How it works
The node calls Ollama's local API (default http://127.0.0.1:11434) and lists whatever models you've already ollama pulled into a dropdown. It's text in, text out - system_prompt and user_prompt widgets, with the response flowing out three STRING outputs: response (the clean answer), thought_process (for thinking-capable models when thinking is on), and raw_response (everything the server returned, unfiltered). Wire response into a prompt or save node and you're done.
A few settings that actually matter:
system_prompt- managed through a popup with saved presets. Presets are stored on the server underuser/<user>/tj_node/ollama_system_prompts.json, so they follow you across browsers and machines - a genuinely nice touch if you access ComfyUI remotely.system_prompt_override- an optional input so another node can push in a system prompt. Nice detail: an empty string won't wipe your widget value, so a missing wire won't nuke your prompt.image(optional) - connect an image and vision-capable models (Qwen2.5-VL, llama3.2-vision, that family) will describe or caption it. This is your lazy person's Image-to-Prompt.prompt_in(optional) - feed the prompt from elsewhere in the graph instead of typing.model_memory/comfy_vram_policy- how long Ollama keeps the model resident and whether ComfyUI unloads its own models before the LLM call. If your VRAM is tight, leave the defaults; if generation and LLM are fighting over memory, this is where you resolve it.
There's also a Stop button to abort a long generation, and the usual TJ get_name / setnode_name wireless pair so you can publish the response without a wire.
Installing it
Two pieces: the pack, and Ollama itself.
# pack
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE
# Ollama (https://ollama.com)
ollama serve
ollama pull qwen3:8b # or llama3.2:3b, gemma3:4b, whatever you like
Restart ComfyUI, pick the model, done. Note the security stance baked into the pack: only a local server is allowed. External Ollama URLs are blocked by default, which is a deliberate choice rather than a bug - it closes off a whole class of "your ComfyUI box reaches out to an arbitrary server" attacks. If you genuinely need a remote Ollama, that's a config change, not the default.
Common issues
Most problems here are Ollama problems, not node problems. If the model dropdown is empty, your Ollama server isn't running or isn't reachable on 11434. If you plug in a vision model and image input does nothing, you pulled a text-only model - grab one of the -vl variants. And if the node feels slow, that's Ollama's CPU inference; the pack doesn't control how fast your local server runs.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| get_name | COMBO | 1 options: (none) | |
| setnode_name | STRING | — | |
| server_url | STRING | http://127.0.0.1:11434 | — |
| model | COMBO | 1 options: | |
| system_prompt | STRING | — | |
| user_prompt | STRING | — | |
| thinking | BOOLEAN | false | — |
| seed | INT | 10–4294967295 | — |
| seed_mode | COMBO | fixed | 4 options: fixed, increment, decrement, randomize |
| temperature | STRING | 0.7 | — |
| top_p | STRING | 0.9 | — |
| repeat_penalty | STRING | 1.1 | — |
| model_memory | COMBO | Unload after run | 3 options: Unload after run, Keep for minutes, Keep loaded |
| keep_minutes | STRING | 5 | — |
| comfy_vram_policy | COMBO | Auto: unload only before first LLM call | 3 options: Auto: unload only before first LLM call, Always unload before each LLM call, Never unload before LLM call |
| imageopt | IMAGE | — | |
| prompt_inopt | STRING | — | |
| system_prompt_overrideopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |
| thought_process | STRING | — |
| raw_response | STRING | — |