QwenVL-F Prompt Enhancer
A local prompt enhancer that turns 'girl in forest' into something the sampler respects
- ENHANCED_OUTPUT
You type girl in a forest at dusk into a text encoder and the sampler gives you a girl-shaped blur in some green smudge. The fix most people converge on is a small local LLM that rewrites rough ideas into structured, model-appropriate prompts before the encoder ever sees them - and that's exactly the job QwenVL-F Prompt Enhancer exists for. No image input, no vision involved: it's the text-only node of the pack, sitting upstream of the sampler and polishing your words.
This is the local-vs-API question answered the unfashionable way. A local 4B–8B model isn't writing better English than a frontier API, but it's free per call, offline, and uncensored - and it never leaves your machine. That's why in this space the local path won: enhancement is short, structured rewriting, which is precisely the job a small obedient model handles without drama.
How it works
The enhancer lists all Transformers checkpoints the pack finds on disk (it scans models/text_encoders and models/LLM), not just vision ones - so it'll happily use a plain Qwen3 text model like Qwen3-4B-Instruct-2507. It auto-detects which kind you picked: a text-only checkpoint goes through AutoModelForCausalLM, a Qwen-VL checkpoint gets routed through the same engine as the main QwenVL node using a "Prompt Refine & Expand" instruction. One node, two code paths, you just pick a model. And true to the fork's house rule, nothing is downloaded automatically - the dropdown is a disk scan.
The inputs that matter
prompt_text- the rough idea to enhance. Leave it blank and the node just emits the style instruction, which is occasionally useful for inspection.enhancement_style- six system prompts: Enhance, Refine, Creative Rewrite, Detailed Visual, Artistic Style, Technical Specs. This is the lever that changes the flavor of the output more than any sampling knob.custom_system_prompt- overrides the style prompt entirely. The escape hatch when none of the six fit.max_tokens(default 256),temperature(0.7),top_p,repetition_penalty(1.1) - small, sane defaults for a short-output job.model_name,quantization,attention_mode,use_torch_compile,device,keep_model_loaded,seed- the shared house settings.
One ENHANCED_OUTPUT string comes out. Wire it into your text encoder - that's the whole pipeline: rough idea → this node → encoder → sampler.
Install & gotchas
ComfyUI Manager (search "ComfyUI-QwenVL-F") or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/id-fa/ComfyUI-QwenVL-F
pip install -r requirements.txt
Restart, then drop a model folder (a directory with config.json beside its weight shards) into models/text_encoders or models/LLM. Qwen3-VL checkpoints want transformers >= 4.57.0. (no models found - see console) means the scan found nothing, and the fork will not fetch it for you.
Two honest warnings. First, an enhancer earns its name by adding detail, and left alone it adds detail you never asked for - if the sampler starts inventing subjects, trim the style prompt or write a custom_system_prompt that says "do not add subjects." Second, don't expect a local enhancer to be a writer; it removes the blank-page problem, it doesn't plot a novel. Keep max_tokens modest, keep the job narrow, and the output stays clean enough to feed straight into conditioning.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | (no models found — see console) | Pick a Transformers checkpoint already present under models/text_encoders or models/LLM. Nothing is downloaded automatically — copy the model folder in yourself, then reload ComfyUI. |
| 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 flash-attn v2 when installed and falls back to SDPA. 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 just emit the preset instruction. | |
| enhancement_style | COMBO | 📝 Enhance | 6 options: 📝 Enhance, 📝 Refine, 📝 Creative Rewrite, 📝 Detailed Visual, 📝 Artistic Style, 📝 Technical Specs |
| custom_system_prompt | STRING | — | |
| max_tokens | INT | 25632–1024 | — |
| temperature | FLOAT | 0.700.1–1 | — |
| top_p | FLOAT | 0.900–1 | — |
| repetition_penalty | FLOAT | 1.100.5–2 | — |
| keep_model_loaded | BOOLEAN | false | — |
| seed | INT | 11–4294967295 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ENHANCED_OUTPUT | STRING | — |