Nodes/ComfyUI-ialhabbal/ialhabbal VLLM Prompt Enhancer
ComfyUI Node

ialhabbal VLLM Prompt Enhancer

From 'girl in red dress in rain' to a full cinematic prompt, on your own GPU

By ialhabbalΒ·Created 4 months agoΒ·Updated 2 months agoΒ· 7
ialhabbal VLLM Prompt Enhancer
    • ENHANCED_OUTPUT
    β—„model_nameQwen3-0.6Bβ–Ί
    β—„quantizationNone (FP16)β–Ί
    β—„attention_modeautoβ–Ί
    β—„use_torch_compilefalseβ–Ί
    β—„deviceautoβ–Ί
    β—„prompt_textβ–Ί
    β—„enhancement_styleπŸ“ Enhanceβ–Ί
    β—„custom_system_promptβ–Ί
    β—„max_tokens256β–Ί
    β—„temperature0.70β–Ί
    β—„top_p0.90β–Ί
    β—„repetition_penalty1.10β–Ί
    β—„keep_model_loadedtrueβ–Ί
    β—„seed1β–Ί

    Type "girl in red dress in rain" and get back a full cinematic paragraph - lighting, lens behavior, color grading, the works - without ever leaving ComfyUI or paying for an API. That's the whole job of ialhabbal_VLLM_PromptEnhancer: a local LLM that rewrites a rough idea into a structured, model-appropriate prompt. It's the "LLM-assisted prompting" pattern the community converged on, and it fits the 2026 architecture neatly - if your checkpoint's encoder is itself a language model reading an instruction, having a second LLM write that instruction is two systems that already speak the same language.

    Unlike its vision siblings, this node is text-in, text-out. No image inputs at all. Default model is Qwen3-0.6B - a tiny text-only model that's almost free to run - with a menu of 21 choices that also lets you swap in vision models if you want one model doing double duty.

    How it works

    The node wraps a HuggingFace text model (or a VLM) with a set of aggressively constrained system prompts. The Enhance style's system prompt literally introduces itself as "a professional Flux.2 Klein9B prompt enhancer" and then lays down absolute rules: output only the final prompt, no explaining, no markdown, no bullets, no "Here are some options," no conversational filler. That hard constraint is the whole reason to use a dedicated enhancer node instead of raw chat - an unconstrained chat LLM dumps preamble and role delimiters into your conditioning, and the result is worse than no enhancer at all. These prompts are written to stop that at the source.

    The inputs that matter:

    • prompt_text - your rough idea. Leave it blank and the node just emits the instruction itself (handy for inspecting what a style does).
    • enhancement_style - six flavors: Enhance (the cinematic expander), Refine (tighten an existing prompt), Creative Rewrite, Detailed Visual, Artistic Style, and Technical Specs (which spits out focal length, aperture, lighting direction - genuinely useful if you feed those to a model that respects them).
    • custom_system_prompt - replaces the built-in instruction entirely. This is your escape hatch when none of the six match your target model's prompt guide.
    • temperature (default 0.7) - this is creative writing, so the default runs warmer than the captioning nodes.
    • max_tokens (default 256, up to 1024) - plenty for a paragraph; these styles are one-shot, not essays.

    Output is a single ENHANCED_OUTPUT string. Wire it into a CLIPTextEncode text input, or - and this is the workflow the pack author actually uses - into the suite's Prompt Verify node, which pauses so you can approve the LLM's rewrite before it costs you a generation.

    Installation

    Same suite as every node here: ComfyUI Manager search ComfyUI-ialhabbal, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/ialhabbal/ComfyUI-ialhabbal.git
    

    then restart. It needs transformers (plus bitsandbytes/accelerate for the 4/8-bit quantization options), which come in with the pack. First run pulls the Qwen3-0.6B weights into models/LLM/Qwen-VL - a small download, nothing like the VL checkpoints.

    Common issues

    • Output still has a preamble - some styles are stricter than others; if one leaks "Here is your enhanced prompt," switch styles or set a custom_system_prompt that hammers the rule again.
    • Repetitive output - repetition_penalty defaults to 1.1; nudge it toward 1.2–1.3.
    • It keeps inventing stuff I didn't ask for - that's the nature of an enhancer, and it's the documented failure mode of this whole category. Narrow the job: keep prompt_text specific about what to preserve, and don't expect a 0.6B model to be a fiction writer.
    • Wrong tone for your base model - the built-ins are written for natural-language encoders. If your checkpoint is a tag-based model that wants comma-separated booru tags, custom_system_prompt is where you tell it so.

    It removes the blank-page problem, not the need to read what it wrote. Treat it as a strong first draft you're allowed to edit.

    CategoryπŸ§ͺialhabbal_VLLM

    Inputs (14)

    NameTypeDefaultDescription
    model_nameCOMBOQwen3-0.6BPick the Qwen-VL checkpoint. First run downloads weights into models/LLM/Qwen-VL, so leave disk space.
    quantizationCOMBONone (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_modeCOMBOautoauto tries flash-attn v2 when installed and falls back to SDPA. Only override when debugging attention backends.
    use_torch_compileBOOLEANfalseEnable torch.compile('reduce-overhead') on supported CUDA/Torch 2.1+ builds for extra throughput after the first compile.
    deviceCOMBOautoChoose where to run the model: auto, cpu, mps, or cuda:x for multi-GPU systems.
    prompt_textSTRINGPrompt text to enhance. Leave blank to just emit the preset instruction.
    enhancement_styleCOMBOπŸ“ 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β€”
    keep_model_loadedBOOLEANtrueβ€”
    seedINT11–4294967295β€”

    Outputs (1)

    NameTypeDescription
    ENHANCED_OUTPUTSTRINGβ€”