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

could you please share the requirements.txt or environment.yml #4

Open
leonardodora opened this issue Apr 24, 2022 · 12 comments
Open

Comments

@leonardodora
Copy link

I have met some problems with the environment.
btw, can cuda11.2 works in faceverse?

@LizhenWangT
Copy link
Owner

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?

@leonardodora
Copy link
Author

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
image
then i met many conflicts, I have switched many version of python and never work.

image

@LizhenWangT
Copy link
Owner

Maybe you can refer to this Issue.

@leonardodora
Copy link
Author

leonardodora commented Apr 25, 2022

Maybe you can refer to this Issue.

image

@leonardodora
Copy link
Author

leonardodora commented Apr 25, 2022

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]$

@LizhenWangT
Copy link
Owner

It seems that you didn't use ninja to compile the ops.

@leonardodora
Copy link
Author

leonardodora commented Apr 25, 2022

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

image

maybe I have installed the wrong version of onnx and onnxruntime, could you please share the version of onnx*

@LizhenWangT
Copy link
Owner

The onnxruntime version is '1.9.0'. The ops is borrowed from StyleGAN2. Maybe you can check the issues of this repository.

@leonardodora
Copy link
Author

leonardodora commented Apr 26, 2022

thanks for your help!
I have fixed this error by not installing onnxruntime-gpu.
but I got another error:
image
maybe it's because the version of pytorch(1.10.0) and cuda(mine is 11.2 not 11.3) is mismatch?

@leonardodora
Copy link
Author

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?

@LizhenWangT
Copy link
Owner

LizhenWangT commented Apr 27, 2022

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.

@antoinersw
Copy link

hello @leonardodora , can you share your environement please ? I m on unbuntun 20.4 too, setting up the env is a nightmare !

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

3 participants