geyuying / PF-AFN

Official code for "Parser-Free Virtual Try-on via Distilling Appearance Flows", CVPR 2021.
540 stars 137 forks source link

conflict between pytorch and cupy #17

Open kris-yangjs opened 3 years ago

kris-yangjs commented 3 years ago

Thanks for your amazing work. I tried the environment installation according to your readme.md. But I found a question: pythorch 1.1.0 is based on cudnn7.5.1, but cupy6.0 is based on a newer version of cudnn, so after the command 'conda install cupy', the version of cudnn changed, and pytorch could not be used anymore.

geyuying commented 3 years ago

Can you try to install pytorch 1.1.0 again and use 'pip install cupy==6.0.0' instead of 'conda install cupy'?

kris-yangjs commented 3 years ago

@geyuying OK, I'll try, thanks for your reply

mesllo commented 2 years ago

Have you found a solution to this? Installing with the exact same environment as specified gives me the below error:

**Traceback (most recent call last): File "/home/bonelloj/.conda/envs/tryon/lib/python3.6/site-packages/cupy/init.py", line 20, in from cupy import core # NOQA File "/home/bonelloj/.conda/envs/tryon/lib/python3.6/site-packages/cupy/core/init.py", line 1, in from cupy.core import core # NOQA File "cupy/core/core.pyx", line 1, in init cupy.core.core File "/home/bonelloj/.conda/envs/tryon/lib/python3.6/site-packages/cupy/cuda/init.py", line 5, in from cupy.cuda import compiler # NOQA File "/home/bonelloj/.conda/envs/tryon/lib/python3.6/site-packages/cupy/cuda/compiler.py", line 12, in from cupy.cuda import function File "cupy/cuda/function.pyx", line 1, in init cupy.cuda.function File "cupy/cuda/texture.pyx", line 1, in init cupy.cuda.texture ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "test.py", line 5, in from models.afwm import AFWM File "/project/prjsbonelloj/vton/repos/PF-AFN/PF-AFN_test/models/afwm.py", line 4, in from .correlation import correlation File "/project/prjsbonelloj/vton/repos/PF-AFN/PF-AFN_test/models/correlation/correlation.py", line 5, in import cupy File "/home/bonelloj/.conda/envs/tryon/lib/python3.6/site-packages/cupy/init.py", line 41, in raise ImportError(_msg) from e ImportError: CuPy is not correctly installed.

If you are using wheel distribution (cupy-cudaXX), make sure that the version of CuPy you installed matches with the version of CUDA on your host. Also, confirm that only one CuPy package is installed: $ pip freeze

If you are building CuPy from source, please check your environment, uninstall CuPy and reinstall it with: $ pip install cupy --no-cache-dir -vvvv

Check the Installation Guide for details: https://docs.cupy.dev/en/latest/install.html

original error: libcuda.so.1: cannot open shared object file: No such file or directory**