Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory #115

Closed
michaeltan53 opened this issue May 11, 2024 · 0 comments

Comments

@michaeltan53
Copy link

I received an error message like this when generating depth map with ZoeD model running on Linux

Using pretrained resource url::https://github.com/isl-org/ZoeDepth/releases/download/v1.0/ZoeD_M12_K.pt
Traceback (most recent call last):
File "depth_predict.py", line 19, in
model_zoe_k = build_model(conf)
File "/home/s_234712236/ZoeDepth/zoedepth/models/builder.py", line 51, in build_model
return get_version(config.version_name).build_from_config(config)
File "/home/s_234712236/ZoeDepth/zoedepth/models/zoedepth/zoedepth_v1.py", line 253, in build_from_config
return ZoeDepth.build(**config)
File "/home/s_234712236/ZoeDepth/zoedepth/models/zoedepth/zoedepth_v1.py", line 248, in build
model = load_state_from_resource(model, pretrained_resource)
File "/home/s_234712236/ZoeDepth/zoedepth/models/model_io.py", line 84, in load_state_from_resource
return load_state_dict_from_url(model, url, progress=True)
File "/home/s_234712236/ZoeDepth/zoedepth/models/model_io.py", line 60, in load_state_dict_from_url
state_dict = torch.hub.load_state_dict_from_url(url, map_location='cpu', **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/hub.py", line 764, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location, weights_only=weights_only)
File "/opt/conda/lib/python3.8/site-packages/torch/serialization.py", line 1004, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/opt/conda/lib/python3.8/site-packages/torch/serialization.py", line 456, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Why does it happen and how can I solve it? Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant