This is a Huggingface CLIPModel flavor of the
HPSv2 model, which is trained to predict human preferences over AI generated images.
I converted the model weights from the openclip format to huggingface CLIPModel.
The two text and image embeddings were tested to be equal before and after conversion.
1from transformers import CLIPProcessor, CLIPModel
2
3model = CLIPModel.from_pretrained("adams-story/HPSv2-hf")
4processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32") # uses the same exact vanilla clip processor