Open leonardodora opened 2 years ago
Yes, cuda11.2 also works. The requirements have been listed in the Readme file. I think the main problem is compiling the op provided by StyleGAN2 or installing the pytorch3D. Could you please describe your problem in detail?
yes, I have met some problems when installing pytorch3d here are my history to installing pytorch3d
then i met many conflicts, I have switched many version of python and never work.
Maybe you can refer to this Issue.
Maybe you can refer to this Issue.
here are the log of installing the op. there are many warnings but no error
python setup.py install running install /data/miniconda3/envs/fv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /data/miniconda3/envs/fv/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info writing upfirdn2d.egg-info/PKG-INFO writing dependency_links to upfirdn2d.egg-info/dependency_links.txt writing top-level names to upfirdn2d.egg-info/top_level.txt reading manifest file 'upfirdn2d.egg-info/SOURCES.txt' writing manifest file 'upfirdn2d.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext /data/miniconda3/envs/fv/lib/python3.9/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.2) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'upfirdn2d' extension /data/miniconda3/envs/fv/lib/python3.9/site-packages/torch/utils/cpp_extension.py:295: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (c++) is not compatible with the compiler Pytorch was built with for this platform, which is g++ on linux. Please use g++ to to compile your extension. Alternatively, you may compile PyTorch from source using c++, and then you can also use c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help with compiling PyTorch from source. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format( Emitting ninja build file /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops/build/temp.linux-x86_64-3.9/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. g++ -pthread -B /data/miniconda3/envs/fv/compiler_compat -shared -Wl,-rpath,/data/miniconda3/envs/fv/lib -Wl,-rpath-link,/data/miniconda3/envs/fv/lib -L/data/miniconda3/envs/fv/lib -L/data/miniconda3/envs/fv/lib -Wl,-rpath,/data/miniconda3/envs/fv/lib -Wl,-rpath-link,/data/miniconda3/envs/fv/lib -L/data/miniconda3/envs/fv/lib -D_GLIBCXX_USE_CXX11_ABI=1 /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops/build/temp.linux-x86_64-3.9/upfirdn2d.o /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops/build/temp.linux-x86_64-3.9/upfirdn2d_kernel.o -L/data/miniconda3/envs/fv/lib/python3.9/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-3.9/upfirdn2d.cpython-39-x86_64-linux-gnu.so creating build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.9/fused.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.9/upfirdn2d.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg creating stub loader for upfirdn2d.cpython-39-x86_64-linux-gnu.so byte-compiling build/bdist.linux-x86_64/egg/upfirdn2d.py to upfirdn2d.cpython-39.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying upfirdn2d.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying upfirdn2d.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying upfirdn2d.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying upfirdn2d.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... pycache.upfirdn2d.cpython-39: module references file creating 'dist/upfirdn2d-0.0.0-py3.9-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing upfirdn2d-0.0.0-py3.9-linux-x86_64.egg removing '/data/miniconda3/envs/fv/lib/python3.9/site-packages/upfirdn2d-0.0.0-py3.9-linux-x86_64.egg' (and everything under it) creating /data/miniconda3/envs/fv/lib/python3.9/site-packages/upfirdn2d-0.0.0-py3.9-linux-x86_64.egg Extracting upfirdn2d-0.0.0-py3.9-linux-x86_64.egg to /data/miniconda3/envs/fv/lib/python3.9/site-packages upfirdn2d 0.0.0 is already the active version in easy-install.pth
Installed /data/miniconda3/envs/fv/lib/python3.9/site-packages/upfirdn2d-0.0.0-py3.9-linux-x86_64.egg Processing dependencies for upfirdn2d==0.0.0 Finished processing dependencies for upfirdn2d==0.0.0 running install /data/miniconda3/envs/fv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /data/miniconda3/envs/fv/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info writing fused.egg-info/PKG-INFO writing dependency_links to fused.egg-info/dependency_links.txt writing top-level names to fused.egg-info/top_level.txt reading manifest file 'fused.egg-info/SOURCES.txt' writing manifest file 'fused.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext /data/miniconda3/envs/fv/lib/python3.9/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.2) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'fused' extension /data/miniconda3/envs/fv/lib/python3.9/site-packages/torch/utils/cpp_extension.py:295: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (c++) is not compatible with the compiler Pytorch was built with for this platform, which is g++ on linux. Please use g++ to to compile your extension. Alternatively, you may compile PyTorch from source using c++, and then you can also use c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help with compiling PyTorch from source. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format( Emitting ninja build file /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops/build/temp.linux-x86_64-3.9/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. g++ -pthread -B /data/miniconda3/envs/fv/compiler_compat -shared -Wl,-rpath,/data/miniconda3/envs/fv/lib -Wl,-rpath-link,/data/miniconda3/envs/fv/lib -L/data/miniconda3/envs/fv/lib -L/data/miniconda3/envs/fv/lib -Wl,-rpath,/data/miniconda3/envs/fv/lib -Wl,-rpath-link,/data/miniconda3/envs/fv/lib -L/data/miniconda3/envs/fv/lib -D_GLIBCXX_USE_CXX11_ABI=1 /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops/build/temp.linux-x86_64-3.9/fused_bias_act.o /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops/build/temp.linux-x86_64-3.9/fused_bias_act_kernel.o -L/data/miniconda3/envs/fv/lib/python3.9/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-3.9/fused.cpython-39-x86_64-linux-gnu.so creating build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.9/upfirdn2d.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.9/fused.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg creating stub loader for fused.cpython-39-x86_64-linux-gnu.so byte-compiling build/bdist.linux-x86_64/egg/fused.py to fused.cpython-39.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying fused.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying fused.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying fused.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying fused.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... pycache.fused.cpython-39: module references file creating 'dist/fused-0.0.0-py3.9-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing fused-0.0.0-py3.9-linux-x86_64.egg removing '/data/miniconda3/envs/fv/lib/python3.9/site-packages/fused-0.0.0-py3.9-linux-x86_64.egg' (and everything under it) creating /data/miniconda3/envs/fv/lib/python3.9/site-packages/fused-0.0.0-py3.9-linux-x86_64.egg Extracting fused-0.0.0-py3.9-linux-x86_64.egg to /data/miniconda3/envs/fv/lib/python3.9/site-packages fused 0.0.0 is already the active version in easy-install.pth
Installed /data/miniconda3/envs/fv/lib/python3.9/site-packages/fused-0.0.0-py3.9-linux-x86_64.egg Processing dependencies for fused==0.0.0 Finished processing dependencies for fused==0.0.0 (fv) [veckydeng@a3644309-6cd9-4afe-a1d9-5c35ec89a97b /cfs/cfs-oom9s50f/users/veckydeng/FaceVerse-main/third_libs/stylegan_ops]$
It seems that you didn't use ninja to compile the ops.
It seems that you didn't use ninja to compile the ops. ‘ninja: no work to do.’ above beause I have compiled before,so I delete the build files before compile again, then you can see ninja may work like below
maybe I have installed the wrong version of onnx and onnxruntime, could you please share the version of onnx*
The onnxruntime version is '1.9.0'. The ops is borrowed from StyleGAN2. Maybe you can check the issues of this repository.
thanks for your help! I have fixed this error by not installing onnxruntime-gpu. but I got another error:
maybe it's because the version of pytorch(1.10.0) and cuda(mine is 11.2 not 11.3) is mismatch?
I have solved this bug. It's just from pytorch1.10.0 installed by conda. And the time consuming per image is 40 minutes, is it expected?
It is possible since it takes about 20 minutes with a GTX3090, You can speed up the method by reducing the number of iterations appropriately.
hello @leonardodora , can you share your environement please ? I m on unbuntun 20.4 too, setting up the env is a nightmare !
I have met some problems with the environment. btw, can cuda11.2 works in faceverse?