DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

Which torch is supported?

Open DuckersMcQuack opened this issue 1 year ago • 2 comments

(DRAGGANTEST) C:\Users\Duckers\Downloads\DragGAN-main>python gradio_app.py stylegan2-ffhq-config-f.pt not found Try to download from huggingface: https://huggingface.co/aaronb/StyleGAN2/resolve/main/stylegan2-ffhq-config-f.pt stylegan2-ffhq-config-f.pt: 133MB [00:02, 47.1MB/s] Downloaded to checkpoints\stylegan2-ffhq-config-f.pt C:\Users\Duckers\Downloads\DragGAN-main\stylegan2\op\conv2d_gradfix.py:88: UserWarning: conv2d_gradfix not supported on PyTorch 2.0.1. Falling back to torch.nn.functional.conv2d(). warnings.warn(

As conv2d isn't supported on pytorch 2.0.1. I can generate, but not save.

DuckersMcQuack avatar May 21 '23 23:05 DuckersMcQuack

Hi, from my test, pytorch 2.x works. The problem might be the lack of imageio-ffmpeg

It can be installed via

pip install imageio-ffmpeg

Could you try it and see if the error still exists?

Zeqiang-Lai avatar May 22 '23 01:05 Zeqiang-Lai

As you can see in conv2d_gradfix.py it will use backend torch in version 1.7 and 1.8

image

otherwise it'll use torch.nn.functional.conv2d()

marwanmusa avatar May 24 '23 06:05 marwanmusa