Text-to-Image Prompt Enhancer
The one that knows Flux doesn't want booru tags
- reference_image_1
- reference_image_2
- positive_prompt
- negative_prompt
- settings_used
- status
- vision_caption
- seed_used
The most common reason a generation looks wrong isn't the model - it's that you wrote the prompt in the wrong dialect. Illustrious wants Danbooru tags, Flux wants a natural-language paragraph, and most of us only speak one of those. This is the node from Eric's Prompt Enhancers pack that handles that translation for you. Type "portrait of a warrior with red armor at golden hour," pick your target platform, and it returns a prompt written the way that model actually likes it - plus a matching negative.
It's the most powerful and the most fiddly node in the pack, and it earns its place. The community's own advice for LLM-encoded models is basically "have an LLM translate what you want into a well-structured prompt following the model's guide," and that's exactly what this does - on a timer, in your graph, with no copy-pasting.
How it works
Under the hood it's the same local-LLM call as the pack's other nodes - no built-in model, talks to LM Studio or Ollama over an OpenAI-compatible endpoint (default http://localhost:1234/v1). The difference is the knowledge baked into its system prompts: 14 target platforms (flux, flux_kontex, sd_xl, sd_1_5, pony, illustrious, chroma, pixart_sigma, aura_flow, noobai, kolors, qwen_image, and more), each with its own prompt style, optimal token length, and negative-prompt conventions. Pick pony and you get score tags and a comma list. Pick flux and you get a clean paragraph - because a T5 encoder treats a tag soup as noise.
It also understands the pack's syntax: (keyword:1.5) for emphasis and {a|b|c} for alternation, both passed through to the LLM and preserved. And it can caption optional reference images (up to two IMAGE inputs) with a vision pass, guided by a directive like recreate, style only, or subject only.
The inputs that matter
There are a lot of them. Here's what you actually touch:
- target_platform - the whole point of the node. Set it to the model you're about to run.
- text_prompt - your idea. Or, via
prompt_context, an instruction:expand_short_prompt,finish_opening_line, orprompt_from_item_listturn a list of elements into a scene. - creative_randomness - off/none/suble/subtle/moderate/bold/storyteller/chaotic.
nonebarely embellishes;storytellerwrites you a mini-narrative. This is the fastest way to get more interesting (or more unhinged) output. - genre_style - 20+ options from cinematic to horror to cyberpunk. This and
target_platformcover 90% of use. - positive_keywords - where your LoRA trigger words go. If a style LoRA needs its trigger in the prompt, put it here so it survives the rewrite.
Everything else - camera angle, composition, lighting source/quality, weather, historical period, framing, pose - defaults to none and only matters when you specifically want to steer something. They're a real trap for over-controlling: set a half-dozen and the LLM stops being creative and starts ticking boxes.
A word about that default negative
The node ships negative_keywords pre-filled with the classic forty-word block (ugly, blurry, bad anatomy, extra fingers...). Here's the thing: on modern distilled models that run at CFG 1, negative prompts are computed at weight zero - they literally do nothing, and the KB's corpus research shows the long boilerplate block reads as cargo even where negatives do work. On Pony/Illustrious it's fine and the pack also auto-generates platform negatives. On Flux or any distilled checkpoint, you're often better off deleting it and restating what you want in the positive.
Outputs and install
Wire positive_prompt into your CLIP Text Encode or conditioning, negative_prompt beside it. vision_caption shows the caption it wrote from your reference image, settings_used summarizes what it applied, seed_used tells you the seed behind the generation when seed_mode is fixed or increment (handy for batched variations). status covers the boring stuff.
Install is shared with the pack: ComfyUI Manager → search "Local LLM Prompt Enhancer", or git clone https://github.com/EricRollei/Local_LLM_Prompt_Enhancer.git into custom_nodes, pip install -r requirements.txt, restart. The hard requirement is just requests; the heavy transformers/accelerate/bitsandbytes stack is only for the optional local Qwen3-VL vision backend. Vision captioning works without it too - point vision_backend at a vision-capable model loaded in LM Studio or Ollama.
One more thing worth knowing: this pack is dual-licensed (non-commercial CC BY-NC plus a commercial license), so if you're building a product on it, check the license before you ship.
Inputs (37)
| Name | Type | Default | Description |
|---|---|---|---|
| text_prompt | STRING | a beautiful woman in a garden | — |
| reference_directive_1 | COMBO | none | 9 options: none, auto, recreate, reinterpret, subject only, style only, +3 |
| reference_directive_2 | COMBO | none | 9 options: none, auto, recreate, reinterpret, subject only, style only, +3 |
| prompt_context | COMBO | none | none/auto: Standard prompt expand_short_prompt: Expand shorthand into full description finish_opening_line: Continue from your opening line prompt_from_item_list: Transform comma-separated elements into scene modify_reference_image: Alter specific parts of reference enhance_reference_image: Enrich reference with new elements |
| creative_randomness | COMBO | none | off/none: Minimal embellishment subtle: Gentle mood enhancement moderate: Add supporting details bold: Vivid scene with narrative hooks storyteller: Imaginative mini-story chaotic: Experimental, surreal twists |
| target_platform | COMBO | flux | 40 options: flux, flux_kontex, sd_xl, sd_1_5, pony, illustrious, +34 |
| llm_backend | COMBO | lm_studio | lm_studio: Uses currently loaded model in LM Studio ollama: Uses currently loaded model in Ollama qwen3_vl: Auto-detects local Qwen3-VL model (no API server needed) |
| api_endpoint | STRING | http://localhost:1234/v1 | lm_studio/ollama: API endpoint URL qwen3_vl: Leave default, or specify custom model path like 'A:\path\to\model' |
| temperature | FLOAT | 0.70.1–2 | — |
| vision_backend | COMBO | auto | Vision captioning: auto=inherit from main LLM, qwen3_vl=local Qwen3-VL, lm_studio/ollama=separate vision model, disable=heuristics only |
| vision_api_endpoint | STRING | http://localhost:1234/v1 | Vision backend API endpoint (lm_studio/ollama) or custom model path (qwen3_vl) For qwen3_vl: Leave default for auto-detect, or specify 'A:\path\to\model' |
| camera_angle | COMBO | none | 12 options: auto, random, none, eye level, low angle, high angle, +6 |
| composition | COMBO | none | 13 options: auto, random, none, rule of thirds, centered, symmetrical, +7 |
| lighting_source | COMBO | none | 16 options: auto, random, none, natural sunlight, studio lighting, golden hour sun, +10 |
| lighting_quality | COMBO | none | 12 options: auto, random, none, soft diffused, hard dramatic, even balanced, +6 |
| time_of_day | COMBO | none | 14 options: auto, random, none, dawn, early morning, mid-morning, +8 |
| historical_period | COMBO | none | 24 options: auto, random, none, prehistoric era, ancient civilizations, classical antiquity, +18 |
| weather | COMBO | none | 13 options: auto, random, none, clear sky, partly cloudy, overcast, +7 |
| art_style | COMBO | none | 19 options: auto, none, photorealistic, digital art, oil painting, watercolor, +13 |
| genre_style | COMBO | none | 29 options: auto, random, none, surreal, cinematic, dramatic, +23 |
| color_mood | COMBO | none | 13 options: auto, random, none, vibrant, muted, monochrome, +7 |
| subject_framing | COMBO | none | 17 options: auto, random, none, extreme close-up, close-up, medium close-up, +11 |
| subject_pose | COMBO | none | 21 options: auto, random, none, standing, sitting, lying down, +15 |
| positive_keywords | STRING | — | |
| negative_keywords | STRING | ugly, blurry, duplicate, deformed, distorted, lowres, bad anatomy, disfigured, poorly drawn, mutation, mutated, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, fused fingers, too many fingers, long neck | — |
| seed_mode | COMBO | random | 4 options: random, fixed, increment, decrement |
| random_seed | INT | -1-1–2147483647 | — |
| save_to_file | BOOLEAN | false | — |
| filename_base | STRING | txt2img_prompt | — |
| reference_image_1opt | IMAGE | — | |
| reference_image_2opt | IMAGE | — | |
| reference_caption_override_1opt | STRING | — | |
| reference_caption_override_2opt | STRING | — | |
| wildcard_llm_blockopt | BOOLEAN | true | Tell the LLM which elements were picked at random so it keeps them: concepts keep their meaning, __=verbatim__ picks stay word for word. Off = the LLM only sees the resolved text. |
| wildcard_instructionsopt | STRING | Connect the llm_instructions output of a Wildcard Processor or Semantic Variation node here when the wildcards were resolved before this node. The LLM is then told which elements were picked at random, and verbatim picks are checked in its answer, exactly as if this node had resolved them itself. | |
| nsfwopt | COMBO | off | How far wildcard picks may go (a word match on each entry and on list names, no model). off = SFW: no suggestive, nude or explicit lists or entries suggestive = also lingerie, bikinis, sexy, seductive ... nudity = also nude, naked, topless ... explicit = everything, including lists under _nsfw/ Fix a wrong rating in _catalog_user.yaml (nsfw: on a list, ratings: on entries). Entries pairing minor-related and sexual terms are removed at every level (config.json "content_filter"). |
| violence_filteropt | COMBO | off | Hold back violent wildcard picks (a word match on each entry and on list names, no model). off = nothing held back no gore = blood and gore, torture, mutilation, corpses no gore or violent acts = also murder, execution, stabbing, strangling, suicide ... no violence or weapons = also guns, swords, knives, bombs, battle, war Only wildcard picks are filtered; text you type is left as is. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |
| settings_used | STRING | — |
| status | STRING | — |
| vision_caption | STRING | — |
| seed_used | INT | — |