e4s2024 / E4S2024

Official Implementation of 'E4S: Fine-grained Face Swapping via Editing With Regional GAN Inversion'
https://e4s2023.github.io/
MIT License
130 stars 19 forks source link

subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. #11

Open IceCocoecI opened 1 year ago

IceCocoecI commented 1 year ago

When executing ”python gradio_swap.py“,An error has occurred.

Traceback (most recent call last): File "/home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1900, in _run_ninja_build subprocess.run( File "/home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

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

Traceback (most recent call last): File "/home/projects/E4S2023/gradio_swap.py", line 17, in from Face_swap_with_two_imgs import FaceSwap File "/home/projects/E4S2023/Face_swap_with_two_imgs.py", line 11, in from models.networks import Net3 File "/home/projects/E4S2023/models/networks.py", line 13, in from models.stylegan2.model import EqualLinear File "/home/projects/E4S2023/models/stylegan2/model.py", line 11, in from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix File "/home/projects/E4S2023/models/stylegan2/op/init.py", line 1, in from .fused_act import FusedLeakyReLU, fused_leaky_relu File "/home/projects/E4S2023/models/stylegan2/op/fused_act.py", line 9, in fused = load( File "/home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load return _jit_compile( File "/home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1508, in _jit_compile _write_ninja_file_and_build_library( File "/home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1623, in _write_ninja_file_and_build_library _run_ninja_build( File "/home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1916, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error building extension 'fused': [1/2] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include/TH -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include/THC -isystem /home/wyfx/anaconda3/envs/E4S2023/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /home/projects/E4S2023/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o FAILED: fused_bias_act_kernel.cuda.o /usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include/TH -isystem /home/wyfx/anaconda3/envs/E4S2023/lib/python3.10/site-packages/torch/include/THC -isystem /home/wyfx/anaconda3/envs/E4S2023/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /home/projects/E4S2023/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 function(_Functor&& __f)
                            ^
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 operator=(_Functor&& __f)
                             ^

/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’ ninja: build stopped: subcommand failed.