cvlab-columbia / viper

Code for the paper "ViperGPT: Visual Inference via Python Execution for Reasoning"
Other
1.65k stars 115 forks source link

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

Open simran-khanuja opened 10 months ago

simran-khanuja commented 10 months ago

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 commented 9 months ago

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))