Closed Cameltr closed 1 year ago
I don't meet this problem on my own machine, could you please check your checkpoint ?
BTW, why use _use_new_zipfile_serialization=False
while loading e4e. It is ckpt = torch.load(self.opts.e4e_model_weights, map_location='cpu')
in the original code, maybe you can delete this parameter and try again ?
Traceback (most recent call last): File "coach_test.py", line 198, in
Coach=CoachTest(opts)
File "coach_test.py", line 41, in init
self.e4e=self.load_e4e()
File "coach_test.py", line 93, in load_e4e
ckpt = torch.load(self.opts.e4e_model_weights, map_location='cpu', _use_new_zipfile_serialization=False)
File "/project/liutaorong/anaconda3/envs/riddle/lib/python3.7/site-packages/torch/serialization.py", line 577, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/project/liutaorong/anaconda3/envs/riddle/lib/python3.7/site-packages/torch/serialization.py", line 241, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: [enforce fail at inline_container.cc:144] . PytorchStreamReader failed reading zip archive: not a ZIP archive