Prompt Enhancer (TJ)
Prompt Enhancer (TJ)
- clip
- enhanced_prompt
- thought_process
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, keepmax_tokensmodest; if you have VRAM,n_gpu_layersof -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.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| get_name | COMBO | (none) | 1 options: (none) |
| set_name | STRING | Prompt_Enhancer | — |
| raw_prompt | STRING | — | |
| model_backend | COMBO | GGUF / llama.cpp | 2 options: GGUF / llama.cpp, ComfyUI TextGenerate |
| gguf_model | COMBO | qwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf | 1 options: qwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf |
| mmproj_file | COMBO | mmproj-qwen3.5-4B-Uncensored-HauhauCS-Aggressive-BF16.gguf | 2 options: none, mmproj-qwen3.5-4B-Uncensored-HauhauCS-Aggressive-BF16.gguf |
| text_encoder_name | COMBO | gemma4_e4b_it_fp8_scaled.safetensors | 1 options: gemma4_e4b_it_fp8_scaled.safetensors |
| clip_loader_type | COMBO | Auto | 29 options: Auto, krea2, stable_diffusion, stable_cascade, sd3, stable_audio, +23 |
| purpose | COMBO | 4 options: Image, Video, Edit (Inpainting/I2V), Custom | |
| model_format | COMBO | 15 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 | |
| aesthetic | COMBO | 22 options: None (no aesthetic injection), Photorealistic, Cinematic Film, Anime / Manga, Studio Ghibli, Pixar / 3D Animation, +16 | |
| extra_instructions | STRING | — | |
| system_prompt_override | STRING | — | |
| append_no_think | BOOLEAN | true | — |
| n_gpu_layers | INT | -1-1–999 | — |
| n_ctx | INT | 4096512–32768 | — |
| max_tokens | INT | 100050–4096 | — |
| temperature | FLOAT | 0.700–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| repeat_penalty | FLOAT | 1.151–2 | — |
| seed | INT | 00–18446744073709550000 | — |
| lock_in | BOOLEAN | false | — |
| raw_prompt_inputopt | STRING | — | |
| clipopt | CLIP | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| thought_process | STRING | — |