apple/ml-stable-diffusion

OSError: Can't load config for 'stabilityai/stable-diffusion-2-1-base'. 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 'stabilityai/stable-diffusion-2-1-base' is the correct path to a directory containing a model_index.json file

Opened this issue · 2 comments

OSError: Can't load config for 'stabilityai/stable-diffusion-2-1-base'. 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 'stabilityai/stable-diffusion-2-1-base' is the correct path to a directory containing a model_index.json file

OSError: Can't load config for 'stabilityai/stable-diffusion-2-1-base'. 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 'stabilityai/stable-diffusion-2-1-base' is the correct path to a directory containing a model_index.json file

I solve this issue by logging into Huggingface as following:

  • Use huggingface-cli login in Terminal
  • Input your token extracted from Token
  • Re-run the program

This problem is caused by the login requirement from HuggingFace. The author of the README file might already log into it before the test, hence didn't meet this problem.

This issue might happen to each user beginning from "Ready-made Core ML Models from Hugging Face Hub" directly to "Image Generation with Python". Hence, I suggest authors update the README file of this project.

cp-cp commented

Thank u!!!!!!!