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

CANNOT IMPORT ---cl : Command line warning D9002 : ignoring unknown option '-O3'-node fails to work in comfyUI #7

Open
jags111 opened this issue Apr 1, 2024 · 8 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@jags111
Copy link

jags111 commented Apr 1, 2024

Traceback (most recent call last):
  File "D:\AI\comfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 2096, in _run_ninja_build
    subprocess.run(
  File "C:\Python311\Lib\subprocess.py", line 571, 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 "D:\AI\comfyUI\nodes.py", line 1888, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\__init__.py", line 1, in <module>
    from .HumanParserLIPCustomNode import HumanParserLIPCustomNode
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\HumanParserLIPCustomNode.py", line 5, in <module>
    from .utils import generate
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\utils.py", line 8, in <module>
    from .schp import networks
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\networks\__init__.py", line 3, in <module>
    from .AugmentCE2P import resnet101
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\networks\AugmentCE2P.py", line 21, in <module>
    from ..modules import InPlaceABNSync
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\__init__.py", line 1, in <module>
    from .bn import ABN, InPlaceABN, InPlaceABNSync
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\bn.py", line 10, in <module>
    from .functions import *
  File "D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\functions.py", line 12, in <module>
    _backend = load(name="inplace_abn",
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "D:\AI\comfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
    _write_ninja_file_and_build_library(
  File "D:\AI\comfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1823, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "D:\AI\comfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'inplace_abn': [1/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
FAILED: inplace_abn_cuda.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
nvcc fatal   : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/HostX86/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
[2/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda_half.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda_half.cu -o inplace_abn_cuda_half.cuda.o
FAILED: inplace_abn_cuda_half.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda_half.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda_half.cu -o inplace_abn_cuda_half.cuda.o
nvcc fatal   : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/HostX86/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
[3/5] cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /std:c++17 -O3 -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cpu.cpp /Foinplace_abn_cpu.o
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-O3'
[4/5] cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /std:c++17 -O3 -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn.cpp /Foinplace_abn.o
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-O3'
ninja: build stopped: subcommand failed.


Cannot import D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node module for custom nodes: Error building extension 'inplace_abn': [1/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
FAILED: inplace_abn_cuda.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
nvcc fatal   : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/HostX86/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
[2/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda_half.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda_half.cu -o inplace_abn_cuda_half.cuda.o
FAILED: inplace_abn_cuda_half.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda_half.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda_half.cu -o inplace_abn_cuda_half.cuda.o
nvcc fatal   : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/HostX86/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
[3/5] cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /std:c++17 -O3 -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cpu.cpp /Foinplace_abn_cpu.o
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-O3'
[4/5] cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /std:c++17 -O3 -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn.cpp /Foinplace_abn.o
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-O3'
ninja: build stopped: subcommand failed.

@gabidobo
Copy link
Member

gabidobo commented Apr 2, 2024

Hmm the error here seems to be nvcc fatal : Could not set up the environment for Microsoft Visual Studio....

Looking at this SO post, looks like this might have to do with the silly issue of having double quotes in any of your environment variables.

Could you please check and see if this is the case?

@gabidobo gabidobo self-assigned this Apr 2, 2024
@gabidobo gabidobo added the help wanted Extra attention is needed label Apr 2, 2024
@jags111
Copy link
Author

jags111 commented Apr 3, 2024

okay will check it on same and come back on it ..
but the error is not nvcc but like here
RuntimeError: Error building extension 'inplace_abn': [1/5] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda.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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\TH -ID:\AI\comfyUI\venv\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Python311\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 -std=c++17 --expt-extended-lambda -c D:\AI\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\src\inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
FAILED: inplace_abn_cuda.cuda.o

@Aljnk
Copy link

Aljnk commented Apr 7, 2024

(IMPORT FAILED): ...\Portable\ComfyUI\ComfyUI\custom_nodes\human-parser-comfyui-node

 if torch.cuda.is_available():
    _backend = load(name="inplace_abn",
                    extra_cflags=["-O3"],
                    sources=[path.join(_src_path, f) for f in [
                        "inplace_abn.cpp",
                        "inplace_abn_cpu.cpp",
                        "inplace_abn_cuda.cu",
                        "inplace_abn_cuda_half.cu"
                    ]],
                    extra_cuda_cflags=["--expt-extended-lambda"])

Visual Studio -> Command '['where', 'cl']' returned non-zero exit status 1.

@gabidobo
Copy link
Member

gabidobo commented Apr 8, 2024

@jags111 I got the nvcc error from the logs you posted initially, I think that might be the root cause of the error, let me know!

@Aljnk see this issue: #6

@Aljnk
Copy link

Aljnk commented Apr 14, 2024

I add cl.exe to the PATH - Thanks - it work.

I read your messages and think about nvcc - I can't find it.
I'm trying to reinstall "NVIDIA GPU Computing Toolkit" - and found strange thing - it install some drivers then reboot system but nvcc not installed.

Solution - install only install ONLY missing libraries - nvcc work (tested in cmd)

Then I found a problem - error building extension 'inplace_abn'.
Found - subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
I add ninja.exe to my PATH (python_embeded\lib\site-packages\ninja\data\bin) - ninja work (tested in cmd)
Not help - log.txt

@Aljnk
Copy link

Aljnk commented Apr 14, 2024

@Cloudwalker2k3
Copy link

(IMPORT FAILED): ...\Portable\ComfyUI\ComfyUI\custom_nodes\human-parser-comfyui-node

 if torch.cuda.is_available():
    _backend = load(name="inplace_abn",
                    extra_cflags=["-O3"],
                    sources=[path.join(_src_path, f) for f in [
                        "inplace_abn.cpp",
                        "inplace_abn_cpu.cpp",
                        "inplace_abn_cuda.cu",
                        "inplace_abn_cuda_half.cu"
                    ]],
                    extra_cuda_cflags=["--expt-extended-lambda"])

Visual Studio -> Command '['where', 'cl']' returned non-zero exit status 1.

Can't you just remove the flag that is causing the issue?

@gabidobo
Copy link
Member

@Aljnk from your logs, it looks like your issue is:

C1083: Cannot open include file: 'Python.h': No such file or directory

I think you need to add that header file to your Python's "include" folder - see https://stackoverflow.com/questions/62003710/include-python-h-no-such-file-or-directory-for-windows-10-fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants