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

gives a (returned non-zero exit status 1) error #22

Open
mertkemal1131 opened this issue Nov 17, 2023 · 3 comments
Open

gives a (returned non-zero exit status 1) error #22

mertkemal1131 opened this issue Nov 17, 2023 · 3 comments

Comments

@mertkemal1131
Copy link

python main.py --input_dir ./ffhq_image/ --im_path1 source.png --im_path2 target.png
After putting this line i get this message
C:\Users\mertk\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Error checking compiler version for cl: [WinError 2] Sistem belirtilen dosyayı bulamıyor
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "main.py", line 12, in
from models.Alignment import Alignment
File "C:\Users\mertk\Style-Your-Hair\models\Alignment.py", line 3, in
from models.Net import Net
File "C:\Users\mertk\Style-Your-Hair\models\Net.py", line 3, in
from models.stylegan2.model import Generator
File "C:\Users\mertk\Style-Your-Hair\models\stylegan2\model.py", line 11, in
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "C:\Users\mertk\Style-Your-Hair\models\stylegan2\op_init_.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "C:\Users\mertk\Style-Your-Hair\models\stylegan2\op\fused_act.py", line 15, in
os.path.join(module_path, "fused_bias_act_kernel.cu"),
File "C:\Users\mertk\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load
keep_intermediates=keep_intermediates)
File "C:\Users\mertk\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1302, in _jit_compile
is_standalone=is_standalone)
File "C:\Users\mertk\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1400, in _write_ninja_file_and_build_library
is_standalone=is_standalone)
File "C:\Users\mertk\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1833, in _write_ninja_file_to_build_library
with_cuda=with_cuda)
File "C:\Users\mertk\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1948, in _write_ninja_file
'cl']).decode().split('\r\n')
File "C:\Users\mertk\anaconda3\envs\test\lib\subprocess.py", line 411, in check_output
**kwargs).stdout
File "C:\Users\mertk\anaconda3\envs\test\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1

@tushar-31093
Copy link

Same here. Seems like a recent error.

@saltukozelgul
Copy link

You have to install Visual Studio Code with C++ support. After that you may have to trigger this bat file to make cl.exe available.
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat"

If error still exist after bat execution, you may to add cl.exe to path manually.

@prabhasreddy-57
Copy link

(hairstyle) C:\Users\prabhas\Desktop\Style-Your-Hair>python main.py --input_dir ./ffhq_image/ --im_path1 source.png --im_path2 target.png --output_dir ./style_your_hair_output/ --warp_loss_with_prev_list delta_w style_hair_slic_large --save_all --version final --flip_check
Traceback (most recent call last):
File "C:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\utils\cpp_extension.py", line 1673, in _run_ninja_build
env=env)
File "C:\Users\prabhas\anaconda3\envs\hairstyle\lib\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 "main.py", line 12, in
from models.Alignment import Alignment
File "C:\Users\prabhas\Desktop\Style-Your-Hair\models\Alignment.py", line 3, in
from models.Net import Net
File "C:\Users\prabhas\Desktop\Style-Your-Hair\models\Net.py", line 3, in
from models.stylegan2.model import Generator
File "C:\Users\prabhas\Desktop\Style-Your-Hair\models\stylegan2\model.py", line 11, in
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "C:\Users\prabhas\Desktop\Style-Your-Hair\models\stylegan2\op_init_.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "C:\Users\prabhas\Desktop\Style-Your-Hair\models\stylegan2\op\fused_act.py", line 15, in
os.path.join(module_path, "fused_bias_act_kernel.cu"),
File "C:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load
keep_intermediates=keep_intermediates)
File "C:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\utils\cpp_extension.py", line 1302, in jit_compile
is_standalone=is_standalone)
File "C:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\utils\cpp_extension.py", line 1407, in write_ninja_file_and_build_library
error_prefix=f"Error building extension '{name}'")
File "C:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\utils\cpp_extension.py", line 1683, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': [1/3] C:\Users\prabhas\AppData\Local\Temp\CUDA\bin\nvcc --generate-dependencies-with-compile --dependency-output fused_bias_act_kernel.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include\TH -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include\THC -IC:\Users\prabhas\AppData\Local\Temp\CUDA\include -IC:\Users\prabhas\anaconda3\envs\hairstyle\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
_ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -c C:\Users\prabhas\Desktop\Style-Your-Hair\models\stylegan2\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
C:\Users\prabhas\AppData\Local\Temp\CUDA\bin\nvcc --generate-dependencies-with-compile --dependency-output fused_bias_act_kernel.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include\TH -IC:\Users\prabhas\anaconda3\envs\hairstyle\lib\site-packages\torch\include\THC -IC:\Users\prabhas\AppData\Local\Temp\CUDA\ininja: fatal: ReadFile: The handle is invalid.

nclude -IC:\Users\prabhas\anaconda3\envs\hairstyle\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -c C:\Users\prabhas\Desktop\Style-Your-Hair\models\stylegan2\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
CreateProcess failed: The system cannot find the file specified.

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

4 participants