Nodes/comfyui-llm-bikeshed/LLM Generate (Advanced)
ComfyUI Node

LLM Generate (Advanced)

Same generation, wired instead of typed

By VirusShell·Created 4 months ago·Updated 3 days ago· 1
LLM Generate (Advanced)
  • provider
  • options
  • meta
  • text
  • meta
◄system_prompt►
◄prompt—►
◄max_tokens1024►
◄seed0►

LLM Generate (Advanced) is the same generation engine as Basic, with the knobs pulled out and turned into sockets. Where Basic asks you to type temperature and max_tokens on the node itself, Advanced takes a connected options object instead - which is exactly what you want once a workflow gets real and you find yourself wanting to swap sampling settings without rebuilding the graph. It's the node you graduate to, not the one you start with.

The mechanism is identical underneath: build a chat message list, call the provider's /v1/chat/completions endpoint, return text. The difference is purely in how inputs arrive. system_prompt and prompt are still required widgets, but provider, options, and meta are all optional inputs you connect rather than type.

The resolution order makes chaining work

Here's the bit that's easy to miss and worth understanding, because it's what powers the pack's multi-generation chains: an explicitly connected provider or options wins over anything carried in from meta. If you don't connect a provider, the node borrows one from the meta input. Same for options. So the canonical pattern is:

  1. First generation node (Basic or Advanced) produces text + meta.
  2. A second Advanced node gets only a new prompt and the previous node's meta.
  3. The model never unloads between them - that's the pack's chain-aware deferral: the first node sees a downstream generation node and skips its unload.

This is the VRAM math from llm-in-comfyui.md done for you - two models trying to share one card is the failure mode these lifecycle games exist to avoid, and Advanced's meta input is how you opt into the "stay loaded, I'm not done" behavior.

The one error you can actually hit: connect neither a provider nor a meta input and the node refuses with "No provider configured." Everything else degrades gracefully - no options connected means the backend just uses its own defaults.

What it's actually for

The real value over Basic shows up in two situations. First, when you want to A/B test sampling: drop two LLM Options nodes on the canvas, connect one, compare, swap - the generation node never changes. Second, when you want the prompt text to come from files rather than typing: LLM Load Text File or LLM Preset Loader plug straight into system_prompt or prompt, and Advanced's whole personality is "feed me from sockets." It also keeps the canvas cleaner in a chain - after the first node, each subsequent generation is just a prompt box and a meta wire.

Outputs and install

Same as Basic: text (STRING) for whatever consumes the reply, and meta (LLM_META) to pass downstream. It also inherits the always-rerun behavior (IS_CHANGED → NaN, per comfyui-node-plumbing.md), which is the right call for a node that talks to a live server.

Install is the pack standard - ComfyUI Manager search "comfyui-llm-bikeshed", or clone into custom_nodes/ and pip install -r requirements.txt; only pyyaml and requests (both already in ComfyUI core), no model downloads. Don't start here - if you're new to the pack, get Basic working first so you know the provider is sound, then refactor to Advanced once the workflow outgrows inline knobs.

CategoryLLM Bikeshed/generation

Inputs (7)

NameTypeDefaultDescription
system_promptSTRING—
promptSTRING—
max_tokensINT10240–128000Output token cap only (not prompt + completion). 0 omits this face limit so the host default applies; an Options or meta limit is kept. 1 or more is sent. No prompt cap; you own timeout and OOM.
seedINT00–18446744073709550000—
provideroptLLM_PROVIDER—
optionsoptLLM_OPTIONS—
metaoptLLM_METAAccepts provider + options from an upstream generation node. Explicit provider/options inputs override meta values.

Outputs (2)

NameTypeDescription
textSTRING—
metaLLM_METACarries provider + options for chaining to downstream generation nodes.