Easy LLM Prompt
Let a local LLM write your SDXL prompt — no API key, no prompt engineering
- enhanced_prompt
- debug_info
The name is a lie in the best way. Easy LLM Prompt doesn't call OpenAI, doesn't need an API key, and doesn't bundle a giant model. It's a thin wrapper that asks a local LLM - one you already run or can install in two minutes - to turn a rough scene description into a finished, comma-stuffed SDXL positive prompt. Type "a young woman with freckles" into Subject, "cherry blossom garden" into Place, "golden hour" into Time, and it hands you back one clean prompt ready for your text encoder. No blank-page staring, no prompt-engineering textbooks.
This is the "LLM as a node" pattern, and it sits entirely upstream of the sampler. The node never sees an image or a latent - it's a text tool doing the job the community keeps re-inventing: structured prompt enhancement (llm-in-comfyui.md tracks "prompt enhancer" mentions growing twentyfold from 2023 to 2026). It fits the architecture rather than fighting it: if SDXL reads comma tags, have a model that's good at comma tags write them.
How it works
Crucially, the node doesn't run the model itself. It's an HTTP client that talks to a server on localhost - Ollama by default at http://localhost:11434, or a llama.cpp server, or anything OpenAI-compatible (LM Studio, vLLM, LocalAI). Its only Python dependencies are the standard library. That's the whole tradeoff in one line: one process for ComfyUI, one for your LLM, and nothing heavy bolted onto ComfyUI itself.
Under the hood it assembles a strict system prompt: the LLM is told it's a "text reformatter" that outputs exactly one line of comma-separated tags, subject first, ordered Subject → Appearance → Clothing → Pose → Action → Expression → Environment → Time → Lighting → Quality - no markdown, no explanations, no invented details. The user message is just the fields you filled in as labeled lines; empty ones are dropped so the model doesn't see placeholders. enhanced_prompt (STRING) wires into your checkpoint; debug_info (STRING) reports backend, model, timing, and cache status - hook it to a ShowText node to see what's happening.
The fields that matter
Five required inputs, all optional in practice: subject, place, time, action, notes. Fill in as few as you like - one word in Subject works. The optional section is where the real controls live:
- mode -
sdxl_prompt(default) compiles your fields;rawsendsuser_messageandsystem_promptstraight to the LLM with no compiler, handy for summarization, translation, or classification. - backend / base_url / model - point at your server.
- seed -
-1is random; a fixed value makes the output deterministic. It also feeds the cache, see below. - temperature / max_tokens - 0.7 and 512 by default.
Two more fields (before_run_shell / after_run_shell) run blocking bash before or after the node - handy for auto-starting your LLM server, but you can ignore them.
Install
ComfyUI Manager: search "Easy LLM Prompt". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/akumaburn/ComfyUI-EasyLLMPrompt.git
Restart ComfyUI - the node shows up under prompt (right-click → Add Node → prompt → Easy LLM Prompt). No pip install, no model files to download. The pack is Apache-2.0, stdlib-only Python, which is refreshingly easy to eyeball for safety: no bundled weights, no surprise downloads, localhost by default.
Then point it at a model. Easiest path:
# install Ollama, then:
ollama pull llama3.2
Leave Base URL at http://localhost:11434 and Model at llama3.2. Done.
Gotchas
The one real complaint people hit: the LLM adds things you didn't ask for. A beginner on r/comfyui asked for a picture of a cat and the enhancer "arbitrarily added 'oil painting'" to the prompt. The default system prompt forbids invented details, but small models don't always obey - this is the subject-drift failure mode every enhancer shares. The fix is a bigger model (llama3.2 is 8B; anything under 3B struggles with instruction following) and keeping your Notes specific.
Other things to know:
- Same output every run? That's the LRU cache doing its job - identical requests dedupe, so with seed
-1you get the cached result back until you change an input or fix the seed. - Nonsense output: swap the model before debugging anything else.
- Slow: cut
max_tokensto 256 and run the server on the same machine. - Settings don't persist? UI changes are per-workflow by design. Edit
{ComfyUI}/user/easy_llm_prompt/config.jsonto change defaults. - "Connection refused" means the LLM server isn't running; "Endpoint not found" usually means a missing
/v1in the URL.
One honest caveat: it's tuned for SDXL's comma-tag style. On Flux or another LLM-encoded checkpoint, Raw Mode with your own system prompt usually beats the compiler.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| subject | STRING | — | |
| place | STRING | — | |
| time | STRING | — | |
| action | STRING | — | |
| notes | STRING | — | |
| modeopt | COMBO | sdxl_prompt | 2 options: sdxl_prompt, raw |
| user_messageopt | STRING | — | |
| system_promptopt | STRING | — | |
| backendopt | COMBO | ollama | 3 options: ollama, openai, llamacpp |
| base_urlopt | STRING | http://localhost:11434 | — |
| modelopt | STRING | llama3.2 | — |
| temperatureopt | FLOAT | 0.70–2 | — |
| max_tokensopt | INT | 5121–4096 | — |
| seedopt | INT | -1-1–18446744073709550000 | -1 = random, any other value = deterministic |
| shell_inputopt | STRING | — | |
| before_run_shellopt | STRING | — | |
| after_run_shellopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| debug_info | STRING | — |