Nodes/ComfyUI LLM Prompt Enhancer/Prompt Enhancer LLM ✨
ComfyUI Node

Prompt Enhancer LLM ✨

Send a one-line prompt to an LLM, get back a shoot-ready brief

By pinkpixel-dev·Created 2 years ago·Updated 15 days ago· 22
Prompt Enhancer LLM ✨
  • clip
  • conditioning
  • enhanced_prompt
prompt
llm_provideropenai
styleBasic Styles > none
prompt_formatdescriptive
openai_key
openai_modelgpt-5.6-luna
anthropic_key
anthropic_modelclaude-haiku-4-5
google_key
google_modelgemini-3.5-flash-lite
openrouter_key
openrouter_modelgoogle/gemma-4-26b-a4b-it:free
ollama_host
ollama_modelllama3.2:1b

"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-chat at api.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/, plus custom (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.

Categoryconditioning/prompt

Inputs (15)

NameTypeDefaultDescription
clipCLIP
promptSTRING
llm_providerCOMBOopenai5 options: openai, anthropic, google, ollama, openrouter
styleCOMBOBasic Styles > none49 options: Basic Styles > none, Basic Styles > detailed, Basic Styles > photorealistic, Basic Styles > cinematic, Basic Styles > artistic, Basic Styles > minimalist, +43
prompt_formatoptCOMBOdescriptive2 options: descriptive, tags
openai_keyoptSTRING
openai_modeloptCOMBOgpt-5.6-luna3 options: gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna
anthropic_keyoptSTRING
anthropic_modeloptCOMBOclaude-haiku-4-53 options: claude-opus-5, claude-sonnet-5, claude-haiku-4-5
google_keyoptSTRING
google_modeloptCOMBOgemini-3.5-flash-lite5 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_keyoptSTRING
openrouter_modeloptSTRINGgoogle/gemma-4-26b-a4b-it:free
ollama_hostoptSTRING
ollama_modeloptSTRINGllama3.2:1b

Outputs (2)

NameTypeDescription
conditioningCONDITIONING
enhanced_promptSTRING