Nodes/ComfyUI-InferenceTimeScaling/Load Qwen VLM Verifier
ComfyUI Node

Load Qwen VLM Verifier

A 7B vision-language model that grades on a rubric

By YRIKKA·Created 2 years ago·Updated about a year ago· 23
Load Qwen VLM Verifier
    • qwen_verifier_instance
    qwen_verifier_idQwen/Qwen2.5-VL-7B-Instruct
    devicecuda
    score_typeoverall_score

    The other two verifiers in this pack score images with a single number. Load Qwen VLM Verifier is different: it loads Qwen2.5-VL, a proper vision-language model, and has it write a critique - graded on prompt accuracy, creativity, visual quality, consistency, and emotional resonance, each with an explanation, plus an overall score. It's the closest thing this pack has to an art teacher looking at your output.

    That's also, predictably, the most expensive judge you can wire up. Worth it for a final hero image; overkill for anything you'd batch.

    How it works

    On first use, the node downloads the chosen model from HuggingFace into ComfyUI/models/LLM/ and caches it there - you don't need weights beforehand. At scoring time it loads the model via transformers, then uses the outlines library's structured generation to force the output into a fixed JSON schema (that's the Grading schema in the source: each of the five aspects gets a score plus a one-to-two sentence explanation). The grading prompt is lifted straight from the DeepMind paper this pack implements. No free-form rambling, no parsing gamble - the model literally can't return anything but the schema.

    Inputs

    • qwen_verifier_id - three choices: Qwen2.5-VL-7B-Instruct (default), 3B-Instruct, 72B-Instruct. Take the 3B unless you have serious VRAM. The 7B is ~18GB in fp16 on top of your diffusion model; the 72B is off the table for essentially everyone reading this.
    • device - cuda or cpu, default cuda.
    • score_type - which aspect's score feeds the search. Default overall_score (the weighted average) is the right call; the other five let you bias the search toward, say, visual_quality_and_realism or accuracy_to_prompt if you're chasing one thing specifically.

    Output

    One wire: qwen_verifier_instance (type QWN_VERIFIER), which plugs into Inference Time Scaler's loaded_qwen_verifier input.

    Install

    Pack install - ComfyUI Manager search "ComfyUI-InferenceTimeScaling", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/YRIKKA/ComfyUI-InferenceTimeScaling
    cd ComfyUI-InferenceTimeScaling
    pip install -e .
    

    Honest expectations

    The Qwen verifier is the smartest judge and the most expensive in every currency: biggest download, biggest VRAM footprint, and slowest scoring, because every candidate triggers a full LLM generation with a system prompt. If you connect all three verifiers to Inference Time Scaler, the Qwen one is where your search rounds will stall. The README's dev machine was an L40S with 48GB and 62GB of RAM - treat that as the realistic floor for the whole ensemble.

    Worth the wait, though, when the stakes are a single image you're actually going to use. A model that can say "the lighting is coherent but the perspective breaks here" beats a cosine similarity every time - and since the node returns the structured JSON as its score source, you can see the reasoning in the scaler's score output instead of just trusting a number.

    CategoryInferenceTimeScaling

    Inputs (3)

    NameTypeDefaultDescription
    qwen_verifier_idCOMBOQwen/Qwen2.5-VL-7B-InstructIdentifier for the Qwen VLM model.
    deviceSTRINGcudaDevice to load the model onto.
    score_typeCOMBOoverall_scoreType of score to return from the Qwen model evaluation.

    Outputs (1)

    NameTypeDescription
    qwen_verifier_instanceQWN_VERIFIER