pythondisco

Disco Diffusion: PytorchStreamReader failed reading zip archive: failed finding central directory


I'm trying to run Disco Diffusion v5 with basically default settings and getting this error when I try to create the image. Does anyone know how to fix this?

Starting Run: Horse 02(0) at frame 0

Prepping model...

RuntimeError                              Traceback (most recent call last)
<ipython-input-20-da8a92ac51ae> in <module>()
    148 print('Prepping model...')
    149 model, diffusion = create_model_and_diffusion(**model_config)
--> 150 model.load_state_dict(torch.load(f'{model_path}/{diffusion_model}.pt', map_location='cpu'))
    151 model.requires_grad_(False).eval().to(device)
    152 for name, param in model.named_parameters():

1 frames
/usr/local/lib/python3.7/dist-packages/torch/serialization.py in __init__(self, name_or_buffer)
    240 class _open_zipfile_reader(_opener):
    241     def __init__(self, name_or_buffer) -> None:
--> 242         super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
    243 
    244 

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

Solution

  • My way to solve this problem is to delete folder 'AI' in google Drive and run it all again. I guess the problem may be caused by an incomplete pre-traning model that was not downloaded correctly by the first run, which prevents the correct version of the model from being downloaded.