DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

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

Open dhlsam opened this issue 2 years ago • 1 comments

(draggan) PS D:> python -m draggan.web C:\Users\sam.conda\envs\draggan\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] warnings.warn(f'Error checking compiler version for {compiler}: {error}') C:\Users\sam.conda\envs\draggan\lib\site-packages\draggan\stylegan2\op\fused_act.py:23: UserWarning: (This is not error) Switch to native implementation f"(This is not error) Switch to native implementation" C:\Users\sam.conda\envs\draggan\lib\site-packages\draggan\stylegan2\op\upfirdn2d.py:22: UserWarning: (This is not error) Switch to native implementation f"(This is not error) Switch to native implementation" Traceback (most recent call last): File "C:\Users\sam.conda\envs\draggan\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\sam.conda\envs\draggan\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\sam.conda\envs\draggan\lib\site-packages\draggan\web.py", line 346, in demo = main() File "C:\Users\sam.conda\envs\draggan\lib\site-packages\draggan\web.py", line 241, in main wrapped_model = ModelWrapper(ckpt=DEFAULT_CKPT, size=CKPT_SIZE[DEFAULT_CKPT]) File "C:\Users\sam.conda\envs\draggan\lib\site-packages\draggan\web.py", line 78, in init self.g_ema = stylegan2(**kwargs).to(device) File "C:\Users\sam.conda\envs\draggan\lib\site-packages\draggan\api.py", line 126, in stylegan2 checkpoint = torch.load(get_path(ckpt)) File "C:\Users\sam.conda\envs\draggan\lib\site-packages\torch\serialization.py", line 777, in load with _open_zipfile_reader(opened_file) as opened_zipfile: File "C:\Users\sam.conda\envs\draggan\lib\site-packages\torch\serialization.py", line 282, in init super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

follow the PyPI install instructions,get runtime error

dhlsam avatar May 26 '23 11:05 dhlsam

Your checkpoints are broken.

Use this command to obtain the directory where the checkpoints saved.

python -c "import draggan; print(draggan.home)"  

For example, here is my checkpoint. /home/laizeqiang/draggan/checkpoints

Then, remove it and run the program again would download the checkpoints again.

Zeqiang-Lai avatar May 26 '23 11:05 Zeqiang-Lai