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 #41

Open
simran-khanuja opened this issue Nov 30, 2023 · 1 comment

Comments

@simran-khanuja
Copy link

I'm getting this error on colab, anyone else facing this issue?

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

RuntimeError                              Traceback (most recent call last)
[/home/skhanuja/viper/main_simple.ipynb](about:blank) Cell 2 line 1
----> 1 from main_simple_lib import *

File[ ~/viper/main_simple_lib.py:32](about:blank)
     29 cache = Memory('cache/' if config.use_cache else None, verbose=0)
     31 mp.set_start_method('spawn', force=True)
--->[ 32](about:blank) from vision_processes import forward, finish_all_consumers  # This import loads all the models. May take a while
     33 from image_patch import *
     34 from video_segment import *

File[ ~/viper/vision_processes.py:177](about:blank)
    175     for process_name_ in model_class_.list_processes():
    176         if process_name_ in config.load_models and config.load_models[process_name_]:
-->[ 177](about:blank)             consumers[process_name_] = make_fn(model_class_, process_name_, counter_)
    178             counter_ += 1
    180 queues_in = None

File[ ~/viper/vision_processes.py:43](about:blank), in make_fn(model_class, process_name, counter)
     40 num_gpus = torch.cuda.device_count()
     41 gpu_number = counter % num_gpus
--->[ 43](about:blank) model_instance = model_class(gpu_number=gpu_number)
     45 def _function(*args, **kwargs):
     46     if process_name != model_class.name:
...
File[ ~/miniconda3/envs/vipergpt/lib/python3.10/site-packages/torch/serialization.py:282](about:blank), in _open_zipfile_reader.__init__(self, name_or_buffer)
    281 def __init__(self, name_or_buffer) -> None:
-->[ 282](about:blank)     super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))

RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
@surisdi
Copy link
Contributor

surisdi commented Dec 22, 2023

Would it be possible to add some print before the line model_instance = model_class(gpu_number=gpu_number) to see what model it is trying to load when it fails? (something like print(model_class))

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

2 participants