Nodes/ComfyUI-LLM-Session/LLM Session Chat (Simple)
ComfyUI Node

LLM Session Chat (Simple)

The easiest local LLM in ComfyUI, and it remembers

By kantan-kanto·Created 7 months ago·Updated 15 days ago· 32
LLM Session Chat (Simple)
  • media
  • assistant_text
user_text
session_iddefault
model(No GGUF models found in models/LLM/)
mmproj(Auto-detect)
history_dir
config_path

This is the pack's front door, and it's the node the included example workflow uses, which tells you the author considers it the right place to start. LLM Session Chat (Simple) is a persistent chat with a local GGUF model that strips the full LLM Session Chat node down to five fields. If the full node is a cockpit with sampling knobs everywhere, this one is the point where you just want a model that talks to you and remembers - and it runs entirely inside ComfyUI through llama-cpp-python. No Ollama, no server, no API key.

The "Simple" name is doing real work, not marketing. Where the standard node puts temperature, max_tokens, n_ctx, summarization, and cache controls on the canvas, this one hides all of it in config/simple_defaults.json - the pack's per-node config file that ships sane defaults like n_gpu_layers: 0, n_ctx: 4096, temperature: 0.7. And here's the nice part: the Simple node can even reach settings the standard node doesn't expose at all. Edit that JSON (or point config_path at your own copy) and you unlock the advanced parameters without cluttering the workflow. For a workflow you're going to share, that's the difference between "here, run this" and "here's 30 inputs to argue with."

The inputs that matter

Five required fields, and honestly only two need your attention:

  • model - the GGUF dropdown from ComfyUI/models/LLM/.
  • session_id - maps to a history file. Same ID continues the conversation across runs; a new ID starts fresh. This is the persistence trick that makes the node worth anything.
  • user_text, mmproj, history_dir - your message, the vision projector (manual selection recommended; the auto-detect is optimistic), and where history lives. Empty history_dir means output/llm_session_sessions/.

The optional media input accepts an IMAGE or AUDIO for this turn only - never saved to history, and audio only works on Gemma 4 models. Output is a single assistant_text string.

The persistence trick, demonstrated

The README's example workflow is the best way to feel what makes this pack different from one-shot LLM nodes. Run once with a prompt that says "prepare an explanation but do not output it yet." Run again with "now provide the explanation you prepared earlier" - and the second response references the first run's context. The model remembered between executions, because the session history is a file on disk, not RAM that evaporates when the queue empties. That's the feature. It's also the footgun: if the model ever seems to know things it shouldn't, your old session_id is still alive, and that's when you'd reach for reset_session (the full node's version; this one uses the config default).

Installing and running it

ComfyUI Manager (search ComfyUI-LLM-Session) or:

cd ComfyUI/custom_nodes
git clone https://github.com/kantan-kanto/ComfyUI-LLM-Session.git
pip install pillow numpy
pip install llama-cpp-python

Restart, drop GGUFs into ComfyUI/models/LLM/, pick a small Q4, and you're chatting. Plain PyPI llama-cpp-python is fine for text; the JamePeng builds are for the newer vision families. Start small - a 7B Q4 with n_gpu_layers set in the config - because at 0 layers everything runs on CPU and your first "is it broken?" moment will just be a slow 32B model grinding.

CategoryLLM/Session

Inputs (7)

NameTypeDefaultDescription
user_textSTRINGUser message for this turn
session_idSTRINGdefaultSession ID (maps to a history file). Same ID continues the chat.
modelCOMBO(No GGUF models found in models/LLM/)GGUF model file in models/LLM/
mmprojCOMBO(Auto-detect)Manual selection is recommended.
history_dirSTRINGOptional directory for history/caches. Empty uses output/llm_session_sessions/.
mediaopt*Optional IMAGE tensor/batch or AUDIO input for this turn only (never saved to history)
config_pathoptSTRINGOptional override path to simple_defaults.json (advanced).

Outputs (1)

NameTypeDescription
assistant_textSTRING