Nodes/ComfyUI-InferenceTimeScaling/Load CLIPScore Verifier
ComfyUI Node

Load CLIPScore Verifier

CLIP similarity, the baseline verifier this pack needs

By YRIKKA·Created 2 years ago·Updated about a year ago· 23
Load CLIPScore Verifier
    • clip_verifier_instance
    clip_verifier_idopenai/clip-vit-base-patch32
    devicecuda

    Inference Time Scaler won't run without a verifier wired in - it literally hard-errors with zero judges connected. Load CLIPScore Verifier is the cheapest, lightest judge you can hand it, and it's the one you should start with.

    What it actually is: an OpenAI CLIP model loaded as a scoring function. Given a generated image and your text prompt, it computes the cosine similarity between the normalized CLIP embeddings of the two. High similarity = the image's content matches the words. That's it. No API, no key, no network call at generation time - it's a local model you already implicitly trust, because CLIP is the same family of text encoder that trained half the SD 1.5/XL ecosystem.

    Inputs

    Just two, and both have sane defaults:

    • clip_verifier_id - four choices. Default is openai/clip-vit-base-patch32, the small one, and it's the right default. clip-vit-large-patch14-336 is the strongest judge but heavier and slower; only bother if the base model keeps ranking things you'd disagree with.
    • device - cuda or cpu, defaulting to cuda. Leave it alone.

    Output

    One wire: clip_verifier_instance (type CS_VERIFIER). Plug it into Inference Time Scaler's loaded_clip_score_verifier input.

    Install and first run

    It's part of the YRIKKA pack, so install is the 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 .
    

    First time the node runs, it pulls the weights from HuggingFace automatically - a few hundred MB for base-patch32, up to ~1.7GB for the large 336 variant. It caches locally, so it's a one-time cost.

    Honest expectations

    CLIP similarity is a text-agreement score, not a beauty score. It rewards "the image contains what the prompt said" and has almost no opinion on composition, realism, or vibe. So as a standalone judge it's the weakest of the three verifiers in this pack - ImageReward knows what humans prefer, and the Qwen VLM grades like an art teacher with a rubric.

    But weak-and-cheap is a feature. It runs in a fraction of the VRAM of the other two, scores in milliseconds, and it's the one judge that reliably won't drag your whole workflow down. The pragmatic play: start with CLIP alone to sanity-check the pipeline, then add ImageReward and Qwen as your hardware allows. And don't panic when the JSON shows scores around 0.3–0.4 - that's not a 0–100 scale, it's a cosine similarity, and relative ranking is all that matters here.

    CategoryInferenceTimeScaling

    Inputs (2)

    NameTypeDefaultDescription
    clip_verifier_idCOMBOopenai/clip-vit-base-patch32Identifier for the CLIP model.
    deviceSTRINGcudaDevice to load the model onto.

    Outputs (1)

    NameTypeDescription
    clip_verifier_instanceCS_VERIFIER