Loader
The Loader that brings PickScore to ComfyUI
- MODEL
Every "best of N" workflow in this pack starts here. The Loader is the only node that talks to Hugging Face, and its whole job is to get PickScore into your graph. PickScore is a CLIP-H (ViT-H/14) model fine-tuned on the Pick-a-Pic human-preference dataset - you give it a prompt and a batch of images, and it predicts which image people would pick as the best match. That's it. No API, no key, no cloud. The model runs on your machine.
What it actually loads
Under the hood it uses the transformers library's CLIPModel and CLIPProcessor, both loaded from whatever path you give it. It picks the device itself via ComfyUI's model management (get_torch_device()), runs float16 on GPU or float32 on CPU, and drops the model into eval mode. A nice touch: the model stays offloaded to CPU until the Selector needs it, then gets pulled to GPU, used, and offloaded again with the cache cleaned up. So it won't squat on your VRAM between runs.
The single input is path - a STRING defaulting to yuvalkirstain/PickScore_v1. That's the official model and the one you want. You can also point it at a local directory if you've already downloaded the model elsewhere, which is handy if you're offline or have a slow connection.
The thing nobody warns you about
First run downloads the model from Hugging Face - and model.safetensors is about 3.9 GB. That's not a hang, that's a download. Give it time, let it finish once, and every later run loads from your local HF cache in seconds. On CPU it'll score slowly but it will score; this is very much a GPU toy.
The other gotcha is sneakier. This pack ships no requirements.txt, but it imports transformers and torch at load time. If your ComfyUI environment doesn't have transformers installed, the whole pack fails to import and you'll see a ModuleNotFoundError: No module named 'transformers'. ComfyUI Manager can't auto-fix this one because there's nothing declared for it to install. In your ComfyUI Python environment:
pip install transformers
then restart ComfyUI. (The portable Windows build - install via the "Install custom nodes" inside ComfyUI Manager - usually gets this sorted as part of the environment, but knowing the fix saves a confused afternoon.)
Wiring it up
The Loader outputs MODEL (type PS_MODEL), which feeds the model input of the current Processor node. In workflows from before April 2024, the old Loader also returned a PROCESSOR output for the split Image/Text Processor nodes - if you're opening one of those, you'll want the modern Loader → Processor → Selector chain instead.
Installing
Either search "ComfyUI PickScore Nodes" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Zuellni/ComfyUI-PickScore-Nodes
Restart ComfyUI and the three nodes appear under the zuellni/pickscore category.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | yuvalkirstain/PickScore_v1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | PS_MODEL | — |