Prompt Enhancer LLM ✨
Send a one-line prompt to an LLM, get back a shoot-ready brief
- clip
- conditioning
- enhanced_prompt
"a beautiful landscape" is a fine seed, but it's not a great prompt. The LLM-prompt-enhancer idea is simple: hand your short prompt to a language model with instructions to expand it into something with camera settings, lighting, composition, and mood - then feed the result to your sampler. This node is that, with three real API providers (DeepSeek, OpenAI, Anthropic) and template files you can edit.
It's the flagship of the Chye ComfyUI Toolset's prompt_tools family. Like a lot of prompt-expansion tools, it won't fix a bad idea - but it turns a bare phrase into a detailed brief that SDXL/Flux-class models actually respond to.
How it works
You pick a template and a provider. The template is an instruction block (e.g., "You are a professional photography prompt engineer. Enhance image generation prompts with camera settings, lighting, composition…") that contains a {prompt} placeholder. The node loads the template, fills in your prompt, and calls the provider's chat API with the whole thing. The model's reply is your enhanced_prompt output - straight into your CLIP/text-encoder input.
Three provider configs are baked in:
- deepseek -
deepseek-chatatapi.deepseek.com(the default; cheap and fast) - openai -
gpt-4-turbo-preview - anthropic -
claude-3-sonnet-20240229
And here's the one that surprises people: custom. The "custom" provider doesn't call any API at all - it just runs your prompt through the template locally (template fill-in, no network). That's the no-key mode, and it's genuinely useful for testing templates or when you're offline.
The inputs that matter
- prompt - your raw prompt (multiline).
- template - a dropdown of template files found in
Presets/Preprompts/, pluscustom(which reveals custom_template_path for a file of your own). - provider - deepseek/openai/anthropic/custom.
- api_key_override - paste a key here to skip the key file. Handy for one-offs, but the file-based key is the intended setup.
- temperature (0–1, default 0.7) and max_tokens (100–4000, default 1000) - standard LLM dials. Lower temperature for more consistent expansion.
Output: enhanced_prompt (STRING).
The setup you can't skip
Before it works, you need the pack's Setup node run once, and an API key on disk:
cd ComfyUI/custom_nodes/Chye-ComfyUI-Toolset/Presets/api_keys
echo "sk-your-real-key" > deepseek_api_key.txt
No key file and no override → the node returns a ❌ File not found error telling you to run setup. The error handling is decent and honest, which is nicer than a silent failure. Note the model names are hardcoded and a little dated (gpt-4-turbo-preview, claude-3-sonnet) - if you're paying for a newer model, the hardcoded defaults won't use it unless the author updates them.
Install
ComfyUI Manager (search "Chye ComfyUI Toolset"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/chyer/Chye-ComfyUI-Toolset
cd Chye-ComfyUI-Toolset
pip install -r requirements.txt
Restart after. Needs requests (in requirements) for the API calls. Zip installs need .git/.cnr-id (Chye-ComfyUI-Toolset) per the README.
Verdict
Prompt enhancers are easy to overhype and easy to dismiss - the truth is they reliably produce longer, more detailed prompts, and whether that helps depends on your model. The standout feature here is the custom provider: template-only expansion with zero API cost. For everything else, it's a straightforward wrapper, and it works.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| llm_provider | COMBO | openai | 5 options: openai, anthropic, google, ollama, openrouter |
| style | COMBO | Basic Styles > none | 49 options: Basic Styles > none, Basic Styles > detailed, Basic Styles > photorealistic, Basic Styles > cinematic, Basic Styles > artistic, Basic Styles > minimalist, +43 |
| prompt_formatopt | COMBO | descriptive | 2 options: descriptive, tags |
| openai_keyopt | STRING | — | |
| openai_modelopt | COMBO | gpt-5.6-luna | 3 options: gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna |
| anthropic_keyopt | STRING | — | |
| anthropic_modelopt | COMBO | claude-haiku-4-5 | 3 options: claude-opus-5, claude-sonnet-5, claude-haiku-4-5 |
| google_keyopt | STRING | — | |
| google_modelopt | COMBO | gemini-3.5-flash-lite | 5 options: gemini-3.1-pro-preview, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-3.1-flash-lite |
| openrouter_keyopt | STRING | — | |
| openrouter_modelopt | STRING | google/gemma-4-26b-a4b-it:free | — |
| ollama_hostopt | STRING | — | |
| ollama_modelopt | STRING | llama3.2:1b | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| enhanced_prompt | STRING | — |