Nodes/ComfyUI-TJ_NODE/Prompt Enhancer (TJ)
ComfyUI Node

Prompt Enhancer (TJ)

Prompt Enhancer (TJ)

By designloves2·Created 4 months ago·Updated 4 days ago· 13
Prompt Enhancer (TJ)
  • clip
  • enhanced_prompt
  • thought_process
get_name(none)
set_namePrompt_Enhancer
raw_prompt
model_backendGGUF / llama.cpp
gguf_modelqwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf
mmproj_filemmproj-qwen3.5-4B-Uncensored-HauhauCS-Aggressive-BF16.gguf
text_encoder_namegemma4_e4b_it_fp8_scaled.safetensors
clip_loader_typeAuto
purpose
model_format
aesthetic
extra_instructions
system_prompt_override
append_no_thinktrue
n_gpu_layers-1
n_ctx4096
max_tokens1000
temperature0.70
top_p0.90
repeat_penalty1.15
seed0
lock_infalse
raw_prompt_input

Here's the thing about prompt enhancers in 2026: the old advice - write a sentence, let an LLM dress it up with more adjectives - mostly doesn't survive contact with modern models. Prompt Enhancer (TJ) gets this. It's not a generic "make my prompt longer" box; it's a local LLM that rewrites your prompt into the format your target model was trained on, whether that's Krea2's "Prompt Enhance" style, natural-language Flux prose, booru tags for Pony/Illustrious, or motion-focused prose for LTX Video. Pick the format, and the rewrite comes out in the right dialect instead of whatever a generic LLM thinks a prompt should look like.

How it works

You type a raw_prompt, choose the target, and a local LLM (GGUF via llama.cpp, or ComfyUI's TextGenerate backend) rewrites it. The node lives on two outputs: enhanced_prompt (what you feed your sampler) and thought_process (the model's reasoning, if it's a thinking model - handy for debugging why it mangled your prompt). lock_in freezes a result so a rerun doesn't re-roll it.

The controls that actually matter:

  • purpose - Image, Video, Edit (inpainting/I2V), or Custom. This steers the whole rewrite.
  • model_format - the dialect list. KREA2 (Prompt Enhance), Flux & Chroma (natural language), Z-Image & Lumina-2 (LLM text encoder), SDXL/SD1.5 tags, Pony & Illustrious booru tags, LTX/Hunyuan/Wan video formats, Json Checker, and more. This is the node's reason to exist - matching the format to the model is what makes an enhancer worth using.
  • aesthetic - an optional style injection (Photorealistic, Cinematic Film, Anime, Cyberpunk, etc.) layered into the system prompt.
  • extra_instructions / system_prompt_override - your own nudges, or a full replacement system prompt.
  • n_gpu_layers, n_ctx, max_tokens, temperature, top_p, repeat_penalty - the llama.cpp knobs. If you're on CPU, keep max_tokens modest; if you have VRAM, n_gpu_layers of -1 offloads everything.

Installing it (this is the part people skip)

The pack install is normal:

cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE

But this node needs llama-cpp-python, and the default pip install is CPU-only and too old for the newest GGUF models. For GPU you build from source - the pack ships build_llama_gemma4.bat (needs VS 2022 Build Tools + CUDA Toolkit, ~10–20 min) with full instructions in LLAMA_GPU_SETUP.md. Then drop a GGUF into ComfyUI/models/text_encoders/. For text-only enhancement the README recommends Qwen3 4B/8B GGUFs; add an mmproj file only if you want the vision variant. Q6_K/Q8_0 if your VRAM allows.

The honest take

Where this shines is matching format to model - feeding booru tags to a Pony workflow or Krea2-style phrasing to Krea2 is a real, measurable quality bump, and the model_format list is more current than most rivals (it names Krea2, Z-Image, Klein-era formats explicitly). Where it's overkill: if you're on an 8 GB card, a 4B GGUF on CPU takes noticeable seconds per rewrite, and a generic "make it prettier" use case isn't worth it. And don't sleep on lock_in - nothing is worse than a seed rerun quietly re-rolling the prompt that made your best image.

Category ✨ TJ_Node/LLM

Inputs (24)

NameTypeDefaultDescription
get_nameCOMBO(none)1 options: (none)
set_nameSTRINGPrompt_Enhancer
raw_promptSTRING
model_backendCOMBOGGUF / llama.cpp2 options: GGUF / llama.cpp, ComfyUI TextGenerate
gguf_modelCOMBOqwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf1 options: qwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf
mmproj_fileCOMBOmmproj-qwen3.5-4B-Uncensored-HauhauCS-Aggressive-BF16.gguf2 options: none, mmproj-qwen3.5-4B-Uncensored-HauhauCS-Aggressive-BF16.gguf
text_encoder_nameCOMBOgemma4_e4b_it_fp8_scaled.safetensors1 options: gemma4_e4b_it_fp8_scaled.safetensors
clip_loader_typeCOMBOAuto29 options: Auto, krea2, stable_diffusion, stable_cascade, sd3, stable_audio, +23
purposeCOMBO4 options: Image, Video, Edit (Inpainting/I2V), Custom
model_formatCOMBO15 options: KREA2 (Prompt Enhance), Flux & Chroma (natural language), Z-Image & Lumina-2 (LLM text encoder), HiDream (hybrid prose + descriptors), SDXL (tags + weights), SD 1.5 (tags + weights), +9
aestheticCOMBO22 options: None (no aesthetic injection), Photorealistic, Cinematic Film, Anime / Manga, Studio Ghibli, Pixar / 3D Animation, +16
extra_instructionsSTRING
system_prompt_overrideSTRING
append_no_thinkBOOLEANtrue
n_gpu_layersINT-1-1–999
n_ctxINT4096512–32768
max_tokensINT100050–4096
temperatureFLOAT0.700–2
top_pFLOAT0.900–1
repeat_penaltyFLOAT1.151–2
seedINT00–18446744073709550000
lock_inBOOLEANfalse
raw_prompt_inputoptSTRING
clipoptCLIP

Outputs (2)

NameTypeDescription
enhanced_promptSTRING
thought_processSTRING