Nodes/comfyui_LLM_party/🖥️Local LLM general link
ComfyUI Node

🖥️Local LLM general link

The local-model chat engine

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
🖥️Local LLM general link
  • model
  • tokenizer
  • image
  • extra_parameters
  • assistant_response
  • history
  • tool
  • image
system_prompt你一个强大的人工智能助手。
user_prompt你好
model_typeLLM
temperature0.7
max_length512
is_memoryenable
is_lockeddisable
main_brainenable
system_prompt_input
user_prompt_input
tools
file_content
conversation_rounds100
historical_record
is_enabletrue
user_history
is_enable_system_roleenable

This is the node everything else in comfyui_LLM_party's local-model side feeds into. GGUF Loader, VLM Loader, VLM-GGUF Loader, Easy Local LLM Loader - they all produce a model output whose only real destination is here. Plug one in, type a prompt, run the graph, get a response. It's the local counterpart to the API-based LLM node, and it's genuinely one of the reasons people recommend this pack unprompted in ComfyUI threads - when someone asks how to run local LLM pipelines inside ComfyUI, "LLM Party with an Ollama or local GGUF backend" is a real answer people give, not a random suggestion.

The core loop is system_prompt (how the model should behave) plus user_prompt (what you're asking it) going in, assistant_response coming out. model_type has to match whatever loader you connected - LLM for a plain local model, LLM-GGUF for a GGUF Loader, VLM-GGUF for a VLM-GGUF Loader, and the three VLM(...) options for the specific vision families the VLM Loader supports. Get this mismatched and you'll get errors or garbage output, because the node is deciding how to talk to the underlying model based on this field, not by inspecting what you actually plugged in. temperature and max_length behave exactly like you'd expect from any LLM interface - higher temperature, more randomness; max_length caps how long the reply can run.

A few fields are worth calling out specifically because their names are misleading if you're used to other tools. is_locked here does not mean "lock the model in memory" - that's the loader nodes' job, and it's a different setting entirely. On this node, is_locked means "skip generating a new response and just re-output whatever the last one was," which is useful for freezing a result while you iterate on the rest of the graph downstream. main_brain is the more interesting toggle: leave it enabled and this node behaves as your primary chat agent; disable it and the node instead becomes a callable tool that another LLM node can invoke through its tools input - this is how the pack builds the multi-agent chains the README talks about, agents calling agents as tools rather than one flat conversation. The tool output exists specifically to be wired into another LLM's tools input for exactly that pattern. Beyond that, is_memory toggles whether conversation history persists across turns, conversation_rounds caps how many turns the model can see back, and image (optional input) lets you hand a picture to a VLM-type model alongside the text prompt.

Installing it means installing the pack as a whole: search "comfyui_LLM_party" in ComfyUI Manager, or git clone https://github.com/heshengtao/comfyui_LLM_party into custom_nodes and restart, then run pip install -r requirements.txt from inside the pack folder using ComfyUI's own Python - portable/embedded installs need the explicit python_embeded\python.exe -m pip install -r requirements.txt form.

Where this trips people up: a mismatched model_type against the actual loader is the single most common source of confusing errors, so double-check that field first if a local model refuses to respond sensibly. The default system_prompt and user_prompt text is in Chinese (this is a Chinese-authored project) - don't panic if the node loads with placeholder text you can't read, just overwrite both fields with your own. And if you're chaining a local GGUF model behind this node, remember the loader upstream needs llama-cpp-python correctly installed for your GPU - an error here that looks like it's coming from LLM_local is very often actually coming from the loader one step earlier in the graph.

Category大模型派对(llm_party)/模型链(model_chain)

Inputs (21)

NameTypeDefaultDescription
modelCUSTOMThe model to use for the LLM.
system_promptSTRING你一个强大的人工智能助手。System prompt, used to describe the behavior of the model and the expected output format.
user_promptSTRING你好User prompt, used to describe the user's request and the expected output format.
model_typeCOMBOLLMThe type of model to use for the LLM. LLM: Language Model, VLM: Vision Language Model, GGUF: Generalized GPT-4 Unified Framework
temperatureFLOAT0.70–1The temperature parameter controls the randomness of the model's output. A higher temperature will result in more random and diverse responses, while a lower temperature will result in more focused and deterministic responses.
max_lengthINT512256–128000The maximum length of the output text.
is_memoryCOMBOenableWhether to enable memory for the LLM.
is_lockedCOMBOdisableWhether to directly output the result from the last output.
main_brainCOMBOenableIf this option is disabled, the LLM will become a tool that can be invoked by other LLMs.
tokenizeroptCUSTOMThe tokenizer to use for the LLM.
imageoptIMAGEUpload images here.
system_prompt_inputoptSTRINGSystem prompt input, used to describe the system's request and the expected output format.
user_prompt_inputoptSTRINGUser prompt input, used to describe the user's request and the expected output format.
toolsoptSTRINGTool list, used to describe the tools that the model can invoke.
file_contentoptSTRINGInput the contents of the file here.
conversation_roundsoptINT1001–10000The maximum number of dialogue turns that the LLM can see in the history records, where one question and one answer constitute one turn.
historical_recordoptCOMBOThe dialogue history file is optional; if not selected and left empty, a new dialogue history file will be automatically created.
is_enableoptBOOLEANtrueWhether to enable the LLM.
extra_parametersoptDICTExtra parameters for the LLM.
user_historyoptSTRINGUser history, you can directly input a JSON string containing multiple rounds of dialogue here.
is_enable_system_roleoptCOMBOenableWhether to enable the system role for the LLM.

Outputs (4)

NameTypeDescription
assistant_responseSTRINGThe assistant's response to the user's request.
historySTRINGThe dialogue history
toolSTRINGThis interface will connect this LLM as a tool to other LLMs.
imageIMAGEImages generated or fetched by the LLM.