Open zjb2020 opened 1 year ago
What's your pytorch version~
@rentainhe I also met this problem, my torch version is: 1.11.0+cu113
See the suggestions here: https://stackoverflow.com/questions/71617570/pytorchstreamreader-failed-reading-zip-archive-failed-finding-central-directory
It happens when the file is corrupted. Removing the caches for torch hub or other models should do the trick. In Google Colab I find them in /root/.cache/ etc.
i fix this problems,is because one of the model didnt download succesful,may be this why?
File "/root/autodl-tmp/zjb/hand/Segment-Anything/Grounded-Segment-Anything-main/grounded_sam_inpainting_demo.py", line 159, in
predictor = SamPredictor(build_sam(checkpoint=sam_checkpoint))
File "/root/autodl-tmp/zjb/hand/Segment-Anything/Grounded-Segment-Anything-main/segment_anything/segment_anything/build_sam.py", line 15, in build_sam_vit_h
return _build_sam(
File "/root/autodl-tmp/zjb/hand/Segment-Anything/Grounded-Segment-Anything-main/segment_anything/segment_anything/build_sam.py", line 105, in _build_sam
state_dict = torch.load(f)
File "/root/miniconda3/lib/python3.10/site-packages/torch/serialization.py", line 797, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/root/miniconda3/lib/python3.10/site-packages/torch/serialization.py", line 283, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory