LLM Create Client
The LLM Client node that turns any OpenAI-compatible API into a ComfyUI brain
- model_options
- LLM_CLIENT
LLM Create Client is the entry point for the whole LLM side of Duanyll Nodepack, and the first thing you'll reach for if you want a language model to actually decide something inside your graph. It doesn't send a message and it doesn't return text - it builds an LLM_CLIENT object that the pack's other nodes (LLM Create Chat, LLM Chat Add Message, LLM Chat Completion) consume. Think of it as the API-key handshake at the start of any chat pipeline.
The name is a small lie, in a good way: it says OpenAI, but it's really an OpenAI-compatible client. Any endpoint that speaks the OpenAI wire format works - OpenRouter, a local vLLM or Ollama server, a Chinese provider's mirror, whatever. You point base_url at it and go. That's the whole appeal: one node, every chat API you own.
The inputs that matter
- api_key - your key. Painful but necessary.
- base_url - defaults to
https://api.openai.com/v1. Change it for anything else. - model - defaults to
"auto", and this is the clever bit. "auto" makes the client hitGET /modelsat your base URL and pick the first available model. For local servers that's often a sensible guess; for big providers it can be a weird pick, so set it explicitly when you know what you want. - image_max_pixels - how large an image can be before the client downscales it before sending (default 1,440,000, i.e. 1200×1200). This is the vision setting. Crank it up if you're feeding it fine detail you need the model to actually read.
- stream - streaming responses (default on), which makes the completion feel fast and is how the pack surfaces tokens as they arrive.
- model_options (optional, any type) - a pass-through dict merged into every request payload. This is where temperature,
max_tokens, and friends go.
The single output is LLM_CLIENT, which wires straight into LLM Create Chat.
Install
The pack installs like any ComfyUI extension: ComfyUI Manager → search "Duanyll Nodepack" → install → restart. Manual route if you prefer:
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
cd duanyll_nodepack
pip install -r requirements.txt
Then restart ComfyUI. The requirements list is heavier than the node itself deserves - matplotlib, opencv-python-headless, kornia, insightface, plus the Volcengine Ark SDK - because the pack is a grab bag and this node shares the install with all of it. It's fine; just don't be surprised when one tiny node drags in OpenCV.
Gotchas
Two things get people. First, "auto" isn't magic - it still makes a network call to /models, so if your base URL is unreachable the node throws even though it "does nothing." Second, the timeout field behaves differently when streaming is on: with streaming, the timeout bounds each chunk, not the whole generation, so a model that loops forever can run long. That's by design - the pack assumes max_tokens (set via model_options) does the bounding instead.
This is a genuinely useful node, but it's also proof that Duanyll Nodepack is a personal pack first: nobody on Reddit is talking about it, there's no community lore, you're mostly on your own. For a general-purpose alternative with a bigger ecosystem, the LLM-flavored packs like ComfyUI-Llama and the various "LLM chat" nodes in ComfyUI Manager are more battle-tested. Reach for this one when you want the OpenAI-compatible everything approach and the vision downscaling built in.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | https://api.openai.com/v1 | — |
| model | STRING | auto | — |
| timeout | INT | 1201–600 | — |
| image_max_pixels | INT | 144000065536–16777216 | — |
| stream | BOOLEAN | true | — |
| model_optionsopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LLM_CLIENT | LLM_CLIENT | — |