ShihaoZhaoZSH / Uni-ControlNet

[NeurIPS 2023] Uni-ControlNet: All-in-One Control to Text-to-Image Diffusion Models
MIT License
574 stars 41 forks source link

failed in CLIPModel.from_pretrained(model_name, cache_dir=annotator_ckpts_path) #9

Open FelixZhang7 opened 1 year ago

FelixZhang7 commented 1 year ago

OSError: Can't load the model for 'openai/clip-vit-large-patch14'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack.

YaPengJi1 commented 2 months ago

Same error

Leo-student commented 1 month ago
  1. download the clip-vit-large-patch14.tar.gz and unzip it in your own path as /path/to/clip-vit-large-patch14
  2. vim annotator/content/__init__.py and change the path to /path/to/clip-vit-large-patch14
  3. vim ldm/modules/encoders/modules.py and change the path in 95 and 198 lines in the class FrozenCLIPEmbedder and FrozenCLIPT5Encoder to path/to/clip-vit-large-patch14