ThinkingLLM Prompt Enhancer (GGUF)
Cheap, fast prompt enhancement on a text-only GGUF
- ENHANCED_OUTPUT
- RAW_TRACE
The HF Prompt Enhancer is convenient but it drags a vision model in to do a text job. This GGUF version is the lean alternative: a text-only Qwen3 quant that exists to expand and refine prompts, nothing else. The default is a Q4_K_M Josiefied Qwen3-4B at ~2.4 GB - about a third of the download of the base node's default VL model - so this is the one to drop into a video-prompt loop where you're enhancing a dozen prompts in a row and don't want to load a 7 GB vision model for any of them.
No image input, no audio input, no vision handlers needed. It's text in, ENHANCED_OUTPUT out, with RAW_TRACE alongside. This is also the node where the pack's uncensored-model catalog shows its hand: the defaults are abliterated and "gabliterated" Qwen3 quants, and the style presets include the LTX 2.3 and Wan 2.2 NSFW scene/timeline templates. If that's not your lane, pick a base Qwen3 quant and a Refine style and it behaves like a polite copy editor.
What to set
preset_system_prompt- the style list:📝 Enhance(default),Refine,Creative Rewrite,Detailed Visual, the LTX/Wan video templates, and✍️ Custom Onlyfor full control viacustom_system_prompt.prompt_text- the rough prompt to enhance; blank means the selected preset instruction becomes the base.custom_system_prompt- required with Custom Only, otherwise prepended to the style.english_output- a small but handy toggle: ask the model to return the final prompt in English even if the source prompt isn't.temperature/top_p/repetition_penalty- 0.7 / 0.9 / 1.1 defaults; the repetition penalty above 1.0 matters more here than on a single-shot answer, because long generated prompts love to loop.max_tokens- 1024 default; bump it when good detail gets cut off.
Rounding out the list: model_name, device (auto/cuda/cpu/mps - auto prefers GPU), keep_model_loaded, seed, keep_last_prompt, stream_tokens_to_terminal, enable_thinking, auto_finalization_retry, and hf_token. The GGUF list marks [local] files it auto-discovers in models/LLM/GGUF/, skipping anything named mmproj.
Installing
Manager (search ThinkingLLM) or:
cd ComfyUI/custom_nodes
git clone https://github.com/goodguy1963/ComfyUI-ThinkingLLM.git
cd ComfyUI-ThinkingLLM
pip install -r requirements.txt
Because this is a GGUF node it still needs a working llama-cpp-python, though not the vision-flavored build - the backend check here runs without requiring the multimodal handlers. Linux auto-installs a matching wheel; Windows users should still verify their llama.cpp build isn't silently CPU-only, since a text-only model on CPU is workable but slow.
Gotchas
The fixed-seed cache returns a saved prompt for identical inputs, and enabling terminal streaming forces a fresh run - that's by design, so you can tell whether you're seeing a cached result or a new one. The catalog defaults are abliterated quants, which is fine and worth knowing, but don't assume every model in the list behaves identically on the thinking toggle - it's advisory on non-Qwen GGUFs. And for the love of clean workflows: the hf_token field is real, and it does not get written to RAW_TRACE or cache keys, but it can be serialized into your saved workflow file - clear it before you share.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Qwen3-4B-abliterated.Q4_K_M.gguf [~2.4GB] | GGUF text model from config or auto-detected local files. [installed] means the catalog model was found in a configured GGUF/LLM location; [local] means an uncatalogued local model. Missing GGUF files download on first use. |
| prompt_text | STRING | Prompt text to enhance. Leave blank to emit the selected preset instruction as the base prompt. | |
| preset_system_prompt | COMBO | 📝 Enhance | Preset enhancement style. Use Custom Only when you want custom_system_prompt to fully control the instruction. |
| custom_system_prompt | STRING | Optional extra instruction. Required when using Custom Only; otherwise it is prepended to the selected style. | |
| max_tokens | INT | 102432–16384 | Maximum new tokens for the enhanced prompt. Increase only when the model truncates useful detail. |
| temperature | FLOAT | 0.700.1–1 | Sampling randomness. Lower is more stable; higher is more varied. |
| top_p | FLOAT | 0.900–1 | Nucleus sampling cutoff. Lower values restrict token choice; 0.9 is a balanced default. |
| repetition_penalty | FLOAT | 1.100.5–2 | Values above 1.0 reduce repeated phrases in the enhanced prompt. |
| english_output | BOOLEAN | false | Ask the model to return the final enhanced prompt in English. MiniMax H3 presets already require English and bypass the generic paragraph translation pass so their official field structure remains intact. |
| device | COMBO | auto | auto prefers GPU when available. If generation is unexpectedly slow, run tools/check_llama_backend.py to verify llama.cpp GPU offload. |
| keep_model_loaded | BOOLEAN | false | Keep the GGUF model in memory after generation so repeated prompt enhancement skips model loading. |
| seed | INT | 11–4294967295 | Sampling seed. Reusing it with identical inputs can reuse the saved prompt result. |
| keep_last_prompt | BOOLEAN | false | Return the saved per-node prompt instead of generating a new one when available. |
| stream_tokens_to_terminal | BOOLEAN | false | Show clean wrapped generated tokens in the ComfyUI terminal. Streaming bypasses fixed-seed reuse for a fresh run. |
| enable_thinking | BOOLEAN | true | Enable model reasoning/thinking when supported. The node still returns the cleaned final prompt, so reasoning may be hidden or empty. |
| auto_finalization_retry | BOOLEAN | false | If enabled, runs an extra LLM completion when the first output is empty or reasoning-only. Disabled by default so one node execution performs one generation pass. |
| hf_token | STRING | Optional Hugging Face access token for private or gated GGUF downloads. It is passed only to the download call, never logged or cached, and the in-memory copy is dropped after the download attempt. Clear this field before saving or sharing workflows. | |
| duration_secondsopt | FLOAT | 5.00.2–150 | Target video duration in seconds. It is used only by registered LTX 2.3 and MiniMax H3 video presets. Connect the same requested duration to the video generator; MiniMax values are normalized to its 17k+5 frame grid at 24 fps. For longer MiniMax scripts, ThinkingLLM selects a coherent moment that fits while keeping any selected dialogue verbatim. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| ENHANCED_OUTPUT | STRING | — |
| RAW_TRACE | STRING | — |