Problem loading pretrained model that exists

radames
Fri, 03 Feb 2023 22:50:51 +0000

hi @Alpha-Romeo ,

I think you can do this, where you need to explicitly pass CLIP config

from diffusers.pipelines.paint_by_example import PaintByExampleImageEncoder
from transformers import CLIPVisionConfig

config = CLIPVisionConfig.from_pretrained("openai/clip-vit-large-patch14")
image_encoder = PaintByExampleImageEncoder(config)