Nodes/ComfyUI-QwenVL/QwenVL Prompt Enhancer (GGUF)
ComfyUI Node

QwenVL Prompt Enhancer (GGUF)

Take a rough idea, get a real prompt — all local, all free

By 1038lab·Created about a year ago·Updated a day ago· 866
QwenVL Prompt Enhancer (GGUF)
    • ENHANCED_OUTPUT
    model_nameQwen3-4B-Q4_K_M.gguf
    prompt_text
    preset_system_prompt📝 Enhance
    custom_system_prompt
    max_tokens256
    temperature0.70
    top_p0.90
    repetition_penalty1.10
    english_outputfalse
    deviceauto
    seed1

    The name is a lie, in the best way. "QwenVL Prompt Enhancer (GGUF)" makes you picture a vision model staring at your render and telling you what to fix. This node never looks at a single pixel - it's a text-only Qwen3 model running through llama.cpp that takes your rough, half-formed prompt idea and rewrites it into the kind of detailed paragraph that actually steers a diffusion model. Think of it as a local, free GPT that lives inside your workflow, so you stop alt-tabbing to ChatGPT every time "woman in a garden" doesn't produce enough.

    It's one node in the ComfyUI-QwenVL pack from 1038lab, the same author whose Qwen3-VL captioning nodes became the default local way to describe images for LoRA datasets. This GGUF variant sits on the llama.cpp backend instead of the Transformers backend, which means a quantized model file on disk and a much lower VRAM footprint - Q4_K_M of a 4B model is a ~2GB file you can run alongside everything else.

    How it works

    The mechanism is straightforward. The node reads your prompt_text, builds a system prompt from one of the six preset styles (Enhance, Refine, Creative Rewrite, Detailed Visual, Artistic Style, Technical Specs) or your own custom_system_prompt, and calls llama_cpp.create_chat_completion on the selected GGUF model. It downloads the model from Hugging Face on first use into ComfyUI/models/LLM/GGUF/, so the first run is slow; every run after that is local and free.

    Where the author put real care is in the output cleanup. Qwen models love to emit thinking and planning text ("First...", "Then...", "I will...") before the actual answer. This node detects that pattern and does a constrained retry that forces a single final prompt paragraph - no bullet points, no JSON fences, no <think> blocks. If you've used raw Qwen in ComfyUI before, you know how much this matters.

    The inputs that matter

    You'll actually touch three of these:

    • model_name - the GGUF file from gguf_models.json. Default is Qwen3-4B-Q4_K_M.gguf, which is the right call for most rigs. If you have VRAM to spare, the Q8_0 is "basically fp16 at half the size" per the KB; if you want uncensored prompt writing for adult or edgy content, the Qwen3-4B-abliterated entries are right there in the list.
    • prompt_text - the rough idea you want enhanced. Leave it blank and the node just emits whatever the preset style asks for.
    • preset_system_prompt / custom_system_prompt - pick a style, or write your own system prompt to fully override it.

    The rest are standard sampling dials (temperature, top_p, repetition_penalty, seed, max_tokens) plus english_output, which forces a second pass translating the result to English. device is auto - let it be.

    The single output, ENHANCED_OUTPUT, is a plain STRING. Wire it into the text input of a CLIP Text Encode node feeding your sampler, or into a Show Text node to eyeball it first.

    Installing it

    ComfyUI Manager: search "QwenVL". Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/1038lab/ComfyUI-QwenVL
    cd ComfyUI-QwenVL
    pip install -r requirements.txt
    

    Then the part that actually bites. The GGUF nodes need a vision-capable fork of llama-cpp-python - the author's docs are emphatic that stock PyPI llama-cpp-python 0.3.35 can't load Qwen3 variants and throws Missing Qwen3VLChatHandler!. Even though this node is text-only, it runs the same backend. Uninstall the stock build, clear pip's cache, and install a release wheel from JamePeng's fork - the pack ships scripts in docs/install_llama_cpp_vision.* to do it for you.

    Common issues

    • Missing Qwen3VLChatHandler! - the stock llama-cpp-python problem above. This is 90% of the support threads. Install the fork.
    • First run hangs or is slow - it's downloading the GGUF. Check your internet before blaming the node.
    • Output looks like planning garbage - the node retries once; if it's still bad, lower temperature or change the seed.
    • The node returns nothing visible - it's not an output node; you still need to wire the STRING somewhere or attach a Show Text node.
    Category🧪AILab/QwenVL

    Inputs (11)

    NameTypeDefaultDescription
    model_nameCOMBOQwen3-4B-Q4_K_M.ggufGGUF model entry defined in gguf_models.json.
    prompt_textSTRINGPrompt text to enhance. Leave blank to just emit the preset instruction.
    preset_system_promptCOMBO📝 Enhance6 options: 📝 Enhance, 📝 Refine, 📝 Creative Rewrite, 📝 Detailed Visual, 📝 Artistic Style, 📝 Technical Specs
    custom_system_promptSTRING
    max_tokensINT25632–1024
    temperatureFLOAT0.700.1–1
    top_pFLOAT0.900–1
    repetition_penaltyFLOAT1.100.5–2
    english_outputBOOLEANfalseForce final output in English using translation prompt.
    deviceCOMBOautoSelect device; auto prefers GPU when available.
    seedINT11–4294967295

    Outputs (1)

    NameTypeDescription
    ENHANCED_OUTPUTSTRING