ComfyUI Node
ThinkingLLM Prompt Enhancer
A ComfyUI node in ThinkingLLM with 18 inputs and 2 outputs.
ThinkingLLM Prompt Enhancer
- ENHANCED_OUTPUT
- RAW_TRACE
◄model_nameQwen3-VL-4B-Instruct-Abliterated [DL: 7.5GB, VRAM: 6.0GB]►
◄quantizationNone (FP16)►
◄attention_modeauto►
◄use_torch_compilefalse►
◄deviceauto►
◄prompt_text►
◄enhancement_style📝 Enhance►
◄custom_system_prompt►
◄max_tokens1024►
◄temperature0.70►
◄top_p0.90►
◄repetition_penalty1.10►
◄keep_model_loadedfalse►
◄seed1►
◄keep_last_promptfalse►
◄stream_tokens_to_terminalfalse►
◄enable_thinkingtrue►
◄hf_token►
CategoryThinkingLLM
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Qwen3-VL-4B-Instruct-Abliterated [DL: 7.5GB, VRAM: 6.0GB] | Pick the Qwen-VL checkpoint. First run downloads weights into models/LLM/Qwen-VL, so leave disk space. |
| quantization | COMBO | None (FP16) | Precision vs VRAM. FP16 gives the best quality if memory allows; 8-bit suits 8–16 GB GPUs; 4-bit fits 6 GB or lower but is slower. |
| attention_mode | COMBO | auto | auto tries SageAttention → FlashAttention 2 → SDPA in order. SDPA is stable and recommended. Only override when debugging attention backends. |
| use_torch_compile | BOOLEAN | false | Enable torch.compile('reduce-overhead') on supported CUDA/Torch 2.1+ builds for extra throughput after the first compile. |
| device | COMBO | auto | Choose where to run the model: auto, cpu, mps, or cuda:x for multi-GPU systems. |
| prompt_text | STRING | Prompt text to enhance. Leave blank to emit the selected preset instruction as the base prompt. | |
| enhancement_style | 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. |
| keep_model_loaded | BOOLEAN | false | Keep the HF 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 | Keep the last generated prompt instead of creating a new one |
| stream_tokens_to_terminal | BOOLEAN | false | Show clean wrapped generated tokens in the ComfyUI terminal. When enabled, fixed-seed prompt reuse is bypassed so a fresh streamed run can occur. |
| enable_thinking | BOOLEAN | true | Enable model reasoning/thinking when the backend supports it: True=allow thinking, False=force direct answer. Even when enabled, easy prompts may still get a direct answer, and this node automatically disables thinking when there is not enough output budget left for useful reasoning. Prompt enhancers still return a cleaned final prompt, so terminal reasoning may be hidden or empty. |
| hf_token | STRING | Optional Hugging Face access token for private or gated model 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. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| ENHANCED_OUTPUT | STRING | — |
| RAW_TRACE | STRING | — |