cozymantis / human-parser-comfyui-node

A ComfyUI node to automatically extract masks for body regions and clothing/fashion items. Made with 💚 by the CozyMantis squad.
https://cozymantis.gumroad.com
GNU General Public License v3.0
72 stars 8 forks source link

IMPORT FAILED. Pls have a look at this error log #8

Closed Zdeto closed 3 months ago

Zdeto commented 5 months ago

comfyui.log I started a developer command prompt for VS2019, fired up comfyui with run_nvidia_gpu.bat. It's a fresh and clean installation. ninja is in the PATH. What is wrong? :) Windows 11 Pro here.

mosobln commented 5 months ago

image getting the same

2024-04-20T00:30:15.195384562Z File "/workspace/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/networks/AugmentCE2P.py", line 21, in 2024-04-20T00:30:15.195388737Z from ..modules import InPlaceABNSync 2024-04-20T00:30:15.195392965Z File "/workspace/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/modules/init.py", line 1, in 2024-04-20T00:30:15.195397080Z from .bn import ABN, InPlaceABN, InPlaceABNSync 2024-04-20T00:30:15.195401557Z File "/workspace/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/modules/bn.py", line 10, in 2024-04-20T00:30:15.195405659Z from .functions import 2024-04-20T00:30:15.195409807Z File "/workspace/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/modules/functions.py", line 12, in 2024-04-20T00:30:15.195413995Z _backend = load(name="inplace_abn", 2024-04-20T00:30:15.195418062Z File "/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load 2024-04-20T00:30:15.195425312Z return _jit_compile( 2024-04-20T00:30:15.195430412Z File "/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1509, in _jit_compile 2024-04-20T00:30:15.195434492Z _write_ninja_file_and_build_library( 2024-04-20T00:30:15.195438582Z File "/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1598, in _write_ninja_file_and_build_library 2024-04-20T00:30:15.195442727Z get_compiler_abi_compatibility_and_version(compiler) 2024-04-20T00:30:15.195449039Z File "/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 337, in get_compiler_abi_compatibility_and_version 2024-04-20T00:30:15.195453769Z if not check_compiler_ok_for_platform(compiler): 2024-04-20T00:30:15.195457925Z File "/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 291, in check_compiler_ok_for_platform 2024-04-20T00:30:15.195462315Z which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT) 2024-04-20T00:30:15.195466412Z File "/usr/lib/python3.10/subprocess.py", line 421, in check_output 2024-04-20T00:30:15.195470437Z return run(popenargs, stdout=PIPE, timeout=timeout, check=True, 2024-04-20T00:30:15.195474427Z File "/usr/lib/python3.10/subprocess.py", line 526, in run 2024-04-20T00:30:15.195478512Z raise CalledProcessError(retcode, process.args, 2024-04-20T00:30:15.195493667Z subprocess.CalledProcessError: Command '['which', 'c++']' returned non-zero exit status 1. 2024-04-20T00:30:15.195498192Z 2024-04-20T00:30:15.195502529Z Cannot import /workspace/ComfyUI/custom_nodes/human-parser-comfyui-node module for custom nodes: Command '['which', 'c++']' returned non-zero exit status 1.

gabidobo commented 5 months ago

@Zdeto from the logs you provided:

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

Somebody reported this before I think - for some reason the compiler can't locate the required "Python.h" file, which is probably in a directory that's not in the OS path (somewhere inside the comfy embedded directory? maybe C:\ComfyUI_windows_portable\python_embeded\include).

I unfortunately don't have easy access to a Windows machine, so it's hard to debug.

However - here's some official suggestions from Microsoft: https://learn.microsoft.com/en-us/visualstudio/python/working-with-c-cpp-python-in-visual-studio?view=vs-2022#error-unable-to-locate-header-file

Basically verify that the C/C++ > General > Additional Include Directories project property contains the path to the include folder for your Python installation.

gabidobo commented 5 months ago

@mosobln you have a different issue according to your logs:

 Command '['which', 'c++']' returned non-zero exit status 1.

So basically you don't have c++ installed, but the node requires it to compile some python extensions.

See https://cloud.google.com/cpp/docs/setup or https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170