Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conv2d_gradfix not supported on pytorch 1.10 #196

Open
rcharan opened this issue Nov 17, 2021 · 10 comments
Open

conv2d_gradfix not supported on pytorch 1.10 #196

rcharan opened this issue Nov 17, 2021 · 10 comments

Comments

@rcharan
Copy link

rcharan commented Nov 17, 2021

This line is not forwards compatible with PyTorch 1.10 and the fallback leads to RuntimeError: derivative for aten::grid_sampler_2d_backward is not implemented.

I will follow up with a full stack trace and a PR to address this.

Edit: I see that this repository isn't accepting PRs, hopefully this will help anyone seeing this issue in the future.

Editing this line as well (which runs the same check) fixes this issue.

CUDA 11.4 with torch==1.10.0+cu111, tested on V100s and K80s

@rcharan
Copy link
Author

rcharan commented Nov 17, 2021

(Related to #195)

@JavierCoronaA01023063
Copy link

TAHNKS

@snoop2head
Copy link

I created a pull request #197 for the fix! Hope it helps 🤗

@zhijiejia
Copy link

Make sure, the cuda is 11.1 or later, notice it is not the cuda that comes with pytorch, but the cuda of the machine itself, it is locate in /usr/local/cuda. It needs to be downloaded and installed manually.

The official also gave the answer in styleGAN3,can be see in https://github.com/NVlabs/stylegan3/blob/main/docs/troubleshooting.md

@Gword
Copy link

Gword commented Jan 2, 2022

I created a pull request #197 for the fix! Hope it helps 🤗

Thank you! This works for me!

@bmquynhlinh
Copy link

This line is not forwards compatible with PyTorch 1.10 and the fallback leads to RuntimeError: derivative for aten::grid_sampler_2d_backward is not implemented.

I will follow up with a full stack trace and a PR to address this.

Edit: I see that this repository isn't accepting PRs, hopefully this will help anyone seeing this issue in the future.

Editing this line as well (which runs the same check) fixes this issue.

CUDA 11.4 with torch==1.10.0+cu111, tested on V100s and K80s

It works for me! Perfect! With RTX 3060, CUDA 11.5, and Torch 10.0.2+111

nkgrush added a commit to nkgrush/stylegan2-ada-pytorch that referenced this issue Mar 9, 2022
nkgrush added a commit to nkgrush/stylegan2-ada-pytorch that referenced this issue Mar 9, 2022
@EtDu
Copy link

EtDu commented Mar 29, 2022

I created a pull request #197 for the fix! Hope it helps hugs

Upon applying this patch, I'm getting the following:

RuntimeError: aten::grid_sampler_2d_backward() is missing value for argument 'output_mask'
pytorch                   1.11.0          py3.7_cuda11.3_cudnn8.2.0_0    pytorch
torchvision               0.12.0               py37_cu113    pytorch

@pedromartip
Copy link

I created a pull request #197 for the fix! Hope it helps hugs

Upon applying this patch, I'm getting the following:

RuntimeError: aten::grid_sampler_2d_backward() is missing value for argument 'output_mask'
pytorch                   1.11.0          py3.7_cuda11.3_cudnn8.2.0_0    pytorch
torchvision               0.12.0               py37_cu113    pytorch

You can fix this problem by modifying if any(torch.__version__.startswith(x) for x in ['1.7.', '1.8.', '1.9'] including the torch version you are using. This code is on grid_sample_gradfix.py.

@Ayesha-Imr
Copy link

I created a pull request #197 for the fix! Hope it helps hugs

Upon applying this patch, I'm getting the following:

RuntimeError: aten::grid_sampler_2d_backward() is missing value for argument 'output_mask'
pytorch                   1.11.0          py3.7_cuda11.3_cudnn8.2.0_0    pytorch
torchvision               0.12.0               py37_cu113    pytorch

You can fix this problem by modifying if any(torch.__version__.startswith(x) for x in ['1.7.', '1.8.', '1.9'] including the torch version you are using. This code is on grid_sample_gradfix.py.

The problem persists still, even after doing so. Any way of resolving this problem?

@pedromartip
Copy link

I created a pull request #197 for the fix! Hope it helps hugs

Upon applying this patch, I'm getting the following:

RuntimeError: aten::grid_sampler_2d_backward() is missing value for argument 'output_mask'
pytorch                   1.11.0          py3.7_cuda11.3_cudnn8.2.0_0    pytorch
torchvision               0.12.0               py37_cu113    pytorch

You can fix this problem by modifying if any(torch.__version__.startswith(x) for x in ['1.7.', '1.8.', '1.9'] including the torch version you are using. This code is on grid_sample_gradfix.py.

The problem persists still, even after doing so. Any way of resolving this problem?

Try to use the grid_sample_gradfix.py of the StyleGAN3. Just copy & paste the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants