SumanthAppala / Vehicle_Identification_System

1 stars 0 forks source link

AttributeError: module 'torch.backends' has no attribute 'mps' #1

Open PcHyUU opened 4 months ago

PcHyUU commented 4 months ago

I have downloaded easyocr==1.7.1. But AttributeError: module 'torch.backends' has no attribute 'mps'

PcHyUU commented 4 months ago

_pickle.UnpicklingError: invalid load key, 'v'.

SumanthAppala commented 4 months ago

Hi, what system are you trying to run this on? A possible solution might be to upgrade your pytorch version, or manually set the device value and see if that helps.

PcHyUU commented 4 months ago

Hi, my system is Ubuntu 20.04 Torch=2.3.0 Torchvision==0.18.0 Self. device="CPU" But still reporting error: _pickle UnpicklingError: invalid load key, 'v'

SumanthAppala commented 4 months ago

Do you have git-lfs installed? The error might be because the model weights need to be downloaded using git-lfs. I would suggest you install git-lfs and then clone the repo again. Check this out: https://stackoverflow.com/questions/33049688/what-causes-the-error-pickle-unpicklingerror-invalid-load-key https://discuss.streamlit.io/t/unpicklingerror-invalid-load-key-v/12976

PcHyUU commented 4 months ago

Thank you. The above problem has been solved. Does the program need to be connected to 'https://huggingface.co' to run? How can I customize the clip-vit-base-patch16 that has been downloaded to my local computer?