NVlabs / stylegan2-ada-pytorch

StyleGAN2-ADA - Official PyTorch implementation
https://arxiv.org/abs/2006.06676
Other
4.09k stars 1.16k forks source link

cudatoolkit, cudnn, pytorch and python compatibility on Windows 11 #305

Open rakhon9 opened 4 months ago

rakhon9 commented 4 months ago

I realised that most of my problems are rooted from a version incompatibility among one of those cuda, cudnn, pytorch and python on windows 11. I have 2 NVIDIA GeForce RTX 2080 Ti Windows 11

First try: I installed following version combination inside my 'stylegan' conda environment:

  • python=3.7.16
  • cudatoolkit=11.0 (manual installation, can be downloaded here )
  • cudnn=8.05.39
  • pip install torch===1.7.1+cu110 torchvision===0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
  • pip install click requests tqdm pyspng ninja imageio-ffmpeg==0.4.3 psutil scipy

everything is great except for cudatoolkit=11.0(it only supports windows 10). So, some drivers support cuda 11.0 not windows 11 and vice versa. cudatoolkit>=11.5 supports windows 11.

Second try: I have uninstalled all cuda related software from my PC. I have created a new 'stylegan2' conda environment to keep second installation separately. This time I have tried to install cuda's compatible version with windows 11.

In that case, there are following errors 'Failed to build CUDA kernels for upfirdn2d' because 'conv2d_gradfix not supported on PyTorch 2.2.2'. This time, everything is great except for pytorch=2.2.2.

Can I never ever find cuda, cudnn, pytorch and python version combination that meets all requirements on my windows 11?

If anyone run the project on Windows 11 without errors. Please let me know cuda, cudnn, pytorch, python versions that you used.