OSError: Unable to load weights from pytorch checkpoint file
When executing python visual_chatgpt.py the second time, it returns the following error.
OSError: Unable to load weights from pytorch checkpoint file for
'/home/usr/.cache/huggingface/hub/models--runwayml--stable-diffusion-inpainting/snapshots/caac1048f28756b68
042add4670bec6f4ae314f8/safety_checker/pytorch_model.bin' at
'/home/usr/.cache/huggingface/hub/models--runwayml--stable-diffusion-inpainting/snapshots/caac1048f28756b68
042add4670bec6f4ae314f8/safety_checker/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0
checkpoint, please set from_tf=True.
The only way I could deal with this is to delete the whole huggingface .cache folder and redownload again. Does anyone have a better solution?
Thank you
Hi, actually you can just download the needed model ckp again and specify your ckp path when loading ckp with from_pretrained() method.
@magedhelmy1 Have you ever check whether there is a pytorch_model.bin in your hugging face .cache folder? If there was not any model files you need, just download it again, and if there was, just find another source of the error
Maybe ur download failed and the file is incomplete, add the .no_exist folder to models--runwayml--stable-diffusion-inpainting and delete the wrong subfolder, then try again.
what's the url to down the pytorch_model.bin
@magedhelmy1 Have you ever check whether there is a pytorch_model.bin in your hugging face .cache folder? If there was not any model files you need, just download it again, and if there was, just find another source of the error