Nodes/Eric's Prompt Enhancers for ComfyUI/Text-to-Image Prompt Enhancer
ComfyUI Node

Text-to-Image Prompt Enhancer

The one that knows Flux doesn't want booru tags

By EricRollei·Created 11 months ago·Updated 9 months ago· 45
Text-to-Image Prompt Enhancer
  • reference_image_1
  • reference_image_2
  • positive_prompt
  • negative_prompt
  • settings_used
  • status
  • vision_caption
  • seed_used
text_prompta beautiful woman in a garden
reference_directive_1none
reference_directive_2none
prompt_contextnone
creative_randomnessnone
target_platformflux
llm_backendlm_studio
api_endpointhttp://localhost:1234/v1
temperature0.7
vision_backendauto
vision_api_endpointhttp://localhost:1234/v1
camera_anglenone
compositionnone
lighting_sourcenone
lighting_qualitynone
time_of_daynone
historical_periodnone
weathernone
art_stylenone
genre_stylenone
color_moodnone
subject_framingnone
subject_posenone
positive_keywords
negative_keywordsugly, 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_moderandom
random_seed-1
save_to_filefalse
filename_basetxt2img_prompt
reference_caption_override_1
reference_caption_override_2

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, or prompt_from_item_list turn a list of elements into a scene.
  • creative_randomness - off/none/suble/subtle/moderate/bold/storyteller/chaotic. none barely embellishes; storyteller writes 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_platform cover 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.

CategoryEric Prompt Enhancers

Inputs (33)

NameTypeDefaultDescription
text_promptSTRINGa beautiful woman in a garden
reference_directive_1COMBOnone9 options: none, auto, recreate, reinterpret, subject only, style only, +3
reference_directive_2COMBOnone9 options: none, auto, recreate, reinterpret, subject only, style only, +3
prompt_contextCOMBOnonenone/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_randomnessCOMBOnoneoff/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_platformCOMBOflux14 options: flux, flux_kontex, sd_xl, sd_1_5, pony, illustrious, +8
llm_backendCOMBOlm_studiolm_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_endpointSTRINGhttp://localhost:1234/v1lm_studio/ollama: API endpoint URL qwen3_vl: Leave default, or specify custom model path like 'A:\path\to\model'
temperatureFLOAT0.70.1–2
vision_backendCOMBOautoVision captioning: auto=inherit from main LLM, qwen3_vl=local Qwen3-VL, lm_studio/ollama=separate vision model, disable=heuristics only
vision_api_endpointSTRINGhttp://localhost:1234/v1Vision 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_angleCOMBOnone12 options: auto, random, none, eye level, low angle, high angle, +6
compositionCOMBOnone13 options: auto, random, none, rule of thirds, centered, symmetrical, +7
lighting_sourceCOMBOnone16 options: auto, random, none, natural sunlight, studio lighting, golden hour sun, +10
lighting_qualityCOMBOnone12 options: auto, random, none, soft diffused, hard dramatic, even balanced, +6
time_of_dayCOMBOnone14 options: auto, random, none, dawn, early morning, mid-morning, +8
historical_periodCOMBOnone24 options: auto, random, none, prehistoric era, ancient civilizations, classical antiquity, +18
weatherCOMBOnone13 options: auto, random, none, clear sky, partly cloudy, overcast, +7
art_styleCOMBOnone19 options: auto, none, photorealistic, digital art, oil painting, watercolor, +13
genre_styleCOMBOnone29 options: auto, random, none, surreal, cinematic, dramatic, +23
color_moodCOMBOnone13 options: auto, random, none, vibrant, muted, monochrome, +7
subject_framingCOMBOnone17 options: auto, random, none, extreme close-up, close-up, medium close-up, +11
subject_poseCOMBOnone21 options: auto, random, none, standing, sitting, lying down, +15
positive_keywordsSTRING
negative_keywordsSTRINGugly, 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_modeCOMBOrandom4 options: random, fixed, increment, decrement
random_seedINT-1-1–2147483647
save_to_fileBOOLEANfalse
filename_baseSTRINGtxt2img_prompt
reference_image_1optIMAGE
reference_image_2optIMAGE
reference_caption_override_1optSTRING
reference_caption_override_2optSTRING

Outputs (6)

NameTypeDescription
positive_promptSTRING
negative_promptSTRING
settings_usedSTRING
statusSTRING
vision_captionSTRING
seed_usedINT