Nodes/Deno Custom Nodes/(Deno) Local LLM Loader
ComfyUI Node

(Deno) Local LLM Loader

Run a local LLM from inside ComfyUI — no API key, nothing leaves your PC

By Deno2026·Created 5 months ago·Updated a day ago· 157
(Deno) Local LLM Loader
  • image
  • result
providerOllama
ollama_model
lm_studio_model
custom_server_urlhttp://127.0.0.1:8000/v1
custom_model
system_prompt
thinkingfalse
seed1
seed_modefixed
model_memoryUnload after run
keep_minutes5
comfy_vram_policyAuto: unload only before first LLM call
prompt
video_seconds0.0
audio_context

The name is a mild lie: "(Deno) Local LLM Loader" doesn't load a model itself. It calls models that are already running on your PC - Ollama, LM Studio, llama.cpp, vLLM, or any OpenAI-compatible server on localhost - and pipes the answer back into your graph as a result string. No cloud, no API key, no config file to hand the model path to ComfyUI. If you can already chat with a model at 127.0.0.1, this node turns it into a workflow component in about a minute.

Why you'd reach for it

The most common job is prompt work: rewrite or expand a rough prompt, generate negative prompts, summarize, or produce structured JSON that another node eats. The README even points at a concrete pairing - feed JSON prompts from the Local LLM Loader straight into the Ideogram Director. The second job is gating: this node is designed to work with its sibling (Deno) Local LLM Reviewer, where the LLM's verdict decides whether media gets saved.

How it works

Pick provider, then the model. For Ollama and LM Studio, the node hits your local server and lists the actual models it finds, so you're not typing names from memory. For llama.cpp, vLLM, or custom, custom_server_url defaults to http://127.0.0.1:8000/v1 and you name the model in custom_model. There's a hard safety constraint here worth liking: the node only talks to localhost-style hosts (127.0.0.1, localhost), so it won't quietly phone a remote endpoint.

The interesting settings are about memory, not the LLM itself:

  • model_memory - Unload after run (default) or keep the model warm. With Keep loaded, keep_minutes controls how long Ollama holds it. For a batch of prompts this matters a lot: keeping the model loaded across the whole batch is dramatically faster than reloading per prompt.
  • comfy_vram_policy - whether ComfyUI models get unloaded before the LLM call. Default is Auto: unload only before first LLM call, which is the right starting point on a single GPU.
  • thinking - request reasoning from models that support it.
  • system_prompt - steer the rewrite/review behavior.
  • image - optional, and only useful with a vision-capable local model.

prompt is your main text; the in-node textarea and the STRING socket feed the same backend field, so you can type in the node or wire text in. The output is result - and for batched prompts it returns a STRING list, which is how it keeps one model loaded across many queued runs.

Install and gotchas

Install is just the pack - no extra Python deps, this node is pure HTTP.

cd ComfyUI/custom_nodes
git clone https://github.com/Deno2026/comfyui-deno-custom-nodes.git
# restart ComfyUI, then start Ollama or LM Studio before first use

The number one beginner failure is starting ComfyUI without the LLM server running - the model dropdown comes up empty. Start Ollama/LM Studio first, then hit the refresh button on the node. Second gotcha: not all local servers support the structured-output / reasoning formats the node tries; if you hit a parse error on a particular model, try thinking off or a different model, because that's usually a server capability mismatch, not a broken node. And keep in mind the node sends text only - it never sends AUDIO, even if the rest of the graph has some.

CategoryDeno/LLM

Inputs (16)

NameTypeDefaultDescription
providerCOMBOOllamaChoose the local provider to call: Ollama, LM Studio, llama.cpp, vLLM, Custom, llama-swap, or Unsloth. Select Unsloth only for an Unsloth Studio server; select LM Studio when an Unsloth GGUF is running inside LM Studio.
ollama_modelCOMBOOllama model name detected from your local Ollama server.
lm_studio_modelCOMBOLM Studio model name detected from your local LM Studio server.
custom_server_urlSTRINGhttp://127.0.0.1:8000/v1Local OpenAI-compatible server URL used by llama.cpp, vLLM, Custom, llama-swap, or Unsloth Studio. Unsloth defaults to http://127.0.0.1:8888/v1 and requires DENO_LOCAL_LLM_UNSLOTH_API_KEY; the key is never stored in the workflow or PNG metadata.
custom_modelSTRINGModel name to call on the selected local OpenAI-compatible server.
system_promptSTRINGOptional instructions that steer how the local LLM rewrites or reviews the prompt.
thinkingBOOLEANfalseAsk for model thinking/reasoning when the selected local model supports it. If LM Studio rejects its optional reasoning-control field before output starts, DENO retries once without that field; the server then decides its default reasoning behavior.
seedINT10–4294967295Seed used for local LLM generation.
seed_modeCOMBOfixedHow the visible seed changes after each queued run.
model_memoryCOMBOUnload after runChoose whether the local model unloads after the run or stays warm.
keep_minutesINT51–240Requested keep duration where the provider supports a TTL. For Unsloth it tracks warm-state/swap decisions but does not schedule a timed unload; use Unload after run or Unload LLM. llama-swap uses its own server-side unload timeout.
comfy_vram_policyCOMBOAuto: unload only before first LLM callChoose whether ComfyUI models should be unloaded before local LLM work.
promptSTRINGMain prompt text. The in-node textarea and STRING socket feed this same backend input.
imageoptIMAGEOptional image sent to a vision-capable local model.
video_secondsoptFLOAT0.00–86400Optional video length. A positive FLOAT adds an English duration sentence to every user prompt sent to the local LLM.
audio_contextoptSTRINGOptional source-audio context appended without replacing the user prompt. Only explicitly labeled user-supplied wording is authoritative; automatic transcript and acoustic analysis remain untrusted evidence.

Outputs (1)

NameTypeDescription
resultSTRINGFinal Result returned by the Local LLM node. When the node executes, its latest Result is embedded in saved workflow metadata; Thinking/reasoning is not persisted. Batched prompts return a STRING list.