ComfyUI-LLM-Helper
A collection of helper nodes for working with LLM APIs in ComfyUI, intended to complement other LLM custom nodes.
ComfyUI LLM Helper
A collection of custom nodes for working with LLM APIs in ComfyUI.
It supports everything from API client management to direct ChatCompletions execution and workflow utilities.
Key Features
Dynamic Model Selection
Easily fetch and update the model list directly from your server with a single click of the Update model names button, loaded straight into the combo menu.
Stream & Async Execution
Supports real-time streaming for /chat/completions to display generation progress and handle user interrupts instantly. Built on an asynchronous architecture, allowing independent nodes to execute concurrently without blocking your workflow.
Dynamic Parameter Control via DynamicCombo
Configure only the parameters you need on the fly without the hassle of chaining multiple node relays.
<img src="assets/feature_llmoptions.webp" />Installation
cd ComfyUI/custom_nodes
git clone https://github.com/bedovyy/ComfyUI-LLM-Helper
cd ComfyUI-LLM-Helper
pip install -r requirements.txt
Or search and install ComfyUI-LLM-Helper on ComfyUI-Manager.
Usage
Simple ChatCompletions using blueprint
<img src="assets/usage_chatcompletions_simple.webp" />ChatCompletions with list
<img src="assets/usage_chatcompletions_with_list.webp" />Nodes
LLM:Client
- Set your LLM server's
base_urland select API key from environment variables (loaded securely fromComfyUI/.env). - Click "Update model names" to query the real /models endpoint and instantly refresh the
model_namedropdown with available models, then use the outputs downstream.
LLM:UnloadModel (llama.cpp)
- Sends an unload request to
llama-serverwhen running in router mode, freeing the model from memory.
LLM:Unpack client
- Unpacks
base_url,api_key, andmodel_namefrom theLLM:Clientnode. This allows these values to be used with other OpenAI API nodes.
Caution: Be aware that the
api_keyis output as a plain string.
LLM:ChatCompletions
- Sends a request via the OpenAI API
/chat/completionsendpoint. Requests are streamed by default, allowing you to monitor progress or interrupt the process within the node. (Streaming can be disabled by addingstream: falsetoLLMCustomJsonOptions.)
LLM:Message
- Constructs messages to be sent to the LLM. In addition to
user,system, andassistantroles, custom roles can be selected. When an image is provided as input, an image ID is automatically assigned.
LLM:Options
- Allows specification of parameters such as
temperatureandtop_p.
LLMCustomJsonOptions
- Allows you to include additional request information by writing it in JSON format.
Preview as Text (storable)
- Similar to
Preview as Text, but saves the value within the workflow, allowing the stored value to be retrieved and reused.
LLM:ChatCompletions Simple (subgraph blueprint)
- A subgraph blueprint that provides a basic configuration for entering system and user prompts.