Problem loading pretrained model that exists
Hi,Im trying to load the image encoder from this repositoryhuggingface.coFantasy-Studio/Paint-by-Example at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.Using this line of code:image_encoder = PaintByExampleImageEncoder.from_pretrained(“Fantasy-Studio/Paint-by-Example”, subfolder=“image_encoder”)However I get the error:OSError: Fantasy-Studio/Paint-by-Example does not appear to have a file named config.json.Even though clearly there is one there in the above link. What is wrong?
2023-02-03T22:50:51Z
hi@Alpha-Romeo,I think you can do this, where you need to explicitly pass CLIP configfrom diffusers.pipelines.paint_by_example import PaintByExampleImageEncoder
from transformers import CLIPVisionConfig

config = CLIPVisionConfig.from_pretrained("openai/clip-vit-large-patch14")
image_encoder = PaintByExampleImageEncoder(config)
2023-02-06T16:23:25Z
Thanks, this resolved the error!