podgorskiy/ALAE

Error while running download_all script

ruanqizhen opened this issue · 1 comments

Got the following error. Any idea how to fix this?

(base) qizhen@xps:~/projects/ALAE$ python training_artifacts/download_all.py
Traceback (most recent call last):
  File "/home/qizhen/projects/ALAE/training_artifacts/download_all.py", line 1, in <module>
    import dlutils
  File "/home/qizhen/miniconda3/lib/python3.9/site-packages/dlutils/__init__.py", line 32, in <module>
    from dlutils.pytorch.jacobian import jacobian
  File "/home/qizhen/miniconda3/lib/python3.9/site-packages/dlutils/pytorch/__init__.py", line 16, in <module>
    from dlutils.pytorch.jacobian import jacobian
  File "/home/qizhen/miniconda3/lib/python3.9/site-packages/dlutils/pytorch/jacobian.py", line 2, in <module>
    from torch.autograd.gradcheck import zero_gradients
ImportError: cannot import name 'zero_gradients' from 'torch.autograd.gradcheck' (/home/qizhen/miniconda3/lib/python3.9/site-packages/torch/autograd/gradcheck.py)

打开training_artifacts/download_all.py,你会看到

dlutils.download.from_url('https://alaeweights.s3.us-east-2.amazonaws.com/ffhq/model_157.pth', directory='training_artifacts/ffhq')

我也不知道它是什么,但是我可以猜出来,他的意思是下载https://alaeweights.s3.us-east-2.amazonaws.com/ffhq/model_157.pth,然后把它放在training_artifacts/ffhq目录下。
你可以手动下载这个链接,然后把它放在正确的位置。