MohamadZeina/Disco_Diffusion_Local

EOFError: Ran out of input

SunburstPC opened this issue · 1 comments

I almost got DD to work on my machine following the WSL guide, installing modules and fixing errors but now I'm stuck when I'm running cell 4. Diffuse!

Need to mention that this is the jupyter notebook browser version not the batch version.

Starting Run: TimeToDiscoTurbo3(0) at frame 0
Prepping model...
./model/512x512_diffusion_uncond_finetune_008100.pt

---------------------------------------------------------------------------
EOFError                                  Traceback (most recent call last)
Input In [15], in <cell line: 152>()
    150 diffusion_model_path = f'{model_path}/{diffusion_model}.pt'
    151 print(diffusion_model_path)
--> 152 model.load_state_dict(torch.load(diffusion_model_path, map_location='cpu'))
    153 model.requires_grad_(False).eval().to(device)
    154 for name, param in model.named_parameters():

File ~/anaconda3/envs/pytorch_110/lib/python3.9/site-packages/torch/serialization.py:608, in load(f, map_location, pickle_module, **pickle_load_args)
    606             return torch.jit.load(opened_file)
    607         return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
--> 608 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)

File ~/anaconda3/envs/pytorch_110/lib/python3.9/site-packages/torch/serialization.py:777, in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
    771 if not hasattr(f, 'readinto') and (3, 8, 0) <= sys.version_info < (3, 8, 2):
    772     raise RuntimeError(
    773         "torch.load does not work with file-like objects that do not implement readinto on Python 3.8.0 and 3.8.1. "
    774         f"Received object of type \"{type(f)}\". Please update to Python 3.8.2 or newer to restore this "
    775         "functionality.")
--> 777 magic_number = pickle_module.load(f, **pickle_load_args)
    778 if magic_number != MAGIC_NUMBER:
    779     raise RuntimeError("Invalid magic number; corrupt file?")

EOFError: Ran out of input

Solved. Reinstalled everything and only followed the instructions in a blank environment with nothing more, I think the problem might have somehow come from installing CUDA drivers myself instead of just using the version used in the instructions. Didn't see it.