TencentARC / GFPGAN

GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.
Other
35.88k stars 5.94k forks source link

I cant train the model when set BASICSR_JIT == 'True' #134

Open 1145520074 opened 2 years ago

1145520074 commented 2 years ago

The error is as following: Traceback (most recent call last): File "/data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1723, in _run_ninja_build env=env) File "/data/zx/miniconda3/envs/D22/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) 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 "gfpgan/train.py", line 3, in from basicsr.train import train_pipeline File "/data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/basicsr/init.py", line 3, in from .archs import * File "/data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/basicsr/archs/init.py", line 16, in _arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames] @@@

RuntimeError: Error building extension 'deform_conv': [1/2] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=deform_conv -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/torch/include -isystem /data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/torch/include/TH -isystem /data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/torch/include/THC -isystem /data/zx/miniconda3/envs/D22/include/python3.7m -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_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' -std=c++14 -c /data/zx/miniconda3/envs/D22/lib/python3.7/site-packages/basicsr/ops/dcn/src/deform_conv_cuda_kernel.cu -o deform_conv_cuda_kernel.cuda.o

Thanks!

maliho0803 commented 2 years ago

how to resolve it?