Closed Tobe2d closed 3 months ago
Hey so it looks like the linker can't find the "python311.lib" file.
LIBPATH seems to correctly point to E:\python_embeded\libs
- can you check if the file is present there, or elsewhere on your system?
I am also having same import fail issue, any idea how to solve it?
Hey so it looks like the linker can't find the "python311.lib" file.
LIBPATH seems to correctly point to
E:\python_embeded\libs
- can you check if the file is present there, or elsewhere on your system?
Could not find it in that folder however when I search the PC i found it in "C:\Python311\libs\python311.lib"
Hmm I think the easiest fix for that is to copy all of the files in C:\Python311\libs\
over to E:\python_embeded\libs
, as it seems that the embedded Python comes without them.
that did not fix
Hmm I think the easiest fix for that is to copy all of the files in
C:\Python311\libs\
over toE:\python_embeded\libs
, as it seems that the embedded Python comes without them.
I have tested it on fresh install with manual install of comfy without the portable version and I get this error:
Traceback (most recent call last):
File "D:\Ai__Project\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__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\__init__.py", line 1, in <module>
from .HumanParserLIPCustomNode import HumanParserLIPCustomNode
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\HumanParserLIPCustomNode.py", line 5, in <module>
from .utils import generate
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\utils.py", line 8, in <module>
from .schp import networks
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\networks\__init__.py", line 3, in <module>
from .AugmentCE2P import resnet101
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\networks\AugmentCE2P.py", line 21, in <module>
from ..modules import InPlaceABNSync
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\__init__.py", line 1, in <module>
from .bn import ABN, InPlaceABN, InPlaceABNSync
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\bn.py", line 10, in <module>
from .functions import *
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\functions.py", line 12, in <module>
_backend = load(name="inplace_abn",
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "D:\Ai__Project\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__Project\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/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
FAILED: inplace_abn.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
LINK : fatal error LNK1104: cannot open file 'python311.lib'
ninja: build stopped: subcommand failed.
Cannot import D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node module for custom nodes: Error building extension 'inplace_abn': [1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
FAILED: inplace_abn.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
LINK : fatal error LNK1104: cannot open file 'python311.lib'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "D:\AiProject\ComfyUI\nodes.py", line 1888, in load_custom_node
module_spec.loader.exec_module(module)
File "
Cannot import D:\AiProject\ComfyUI\custom_nodes\human-parser-comfyui-node module for custom nodes: Error building extension 'inplace_abn': [1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\AiProject\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\AiProject\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd FAILED: inplace_abn.pyd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\AiProject\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd LINK : fatal error LNK1104: cannot open file 'python311.lib' ninja: build stopped: subcommand failed.
I moved from portable to Manual Installation of comfyui using venv and now I have this error:
Traceback (most recent call last):
File "D:\Ai__Project\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__Project\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__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\__init__.py", line 1, in <module>
from .HumanParserLIPCustomNode import HumanParserLIPCustomNode
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\HumanParserLIPCustomNode.py", line 5, in <module>
from .utils import generate
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\utils.py", line 8, in <module>
from .schp import networks
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\networks\__init__.py", line 3, in <module>
from .AugmentCE2P import resnet101
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\networks\AugmentCE2P.py", line 21, in <module>
from ..modules import InPlaceABNSync
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\__init__.py", line 1, in <module>
from .bn import ABN, InPlaceABN, InPlaceABNSync
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\bn.py", line 10, in <module>
from .functions import *
File "D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node\schp\modules\functions.py", line 12, in <module>
_backend = load(name="inplace_abn",
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "D:\Ai__Project\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__Project\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/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
FAILED: inplace_abn.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
LINK : fatal error LNK1104: cannot open file 'python311.lib'
ninja: build stopped: subcommand failed.
Cannot import D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node module for custom nodes: Error building extension 'inplace_abn': [1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
FAILED: inplace_abn.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" inplace_abn.o inplace_abn_cpu.o inplace_abn_cuda.cuda.o inplace_abn_cuda_half.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Ai__Project\ComfyUI\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" cudart.lib /out:inplace_abn.pyd
LINK : fatal error LNK1104: cannot open file 'python311.lib'
ninja: build stopped: subcommand failed.
(IMPORT FAILED): D:\Ai__Project\ComfyUI\custom_nodes\human-parser-comfyui-node
I really want to test this node ;-(
All of the errors above seem related to the single issue of the compiler not being able to locate the "python311.lib" file.
Two possible options:
Add the path to the "python311.lib" file to the "LIB" and "LIBPATH" variables. Not a Windows user myself, but looks like you can do this by clicking "Environment Variable" in "Advance System Settings", and then editing "LIB" and "LIBPATH" to contain the path to the directory containing the client libraries. Note that only the directory path should be added to these vars, don't include the filename as well.
Try running in the "x64 Native Tools Command Prompt" in the hope that this automatically sets all proper paths - but not sure about this one. Here's docs on how to launch the dev command prompt: https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022 You'll want to run something similar to:
cd X:\path\to\comfy
python main.py
I'd try making the first approach with env vars work - the whole thing here is helping the compiler see the missing lib file.
@gabidobo Thank you for the reply! Finally, it works based on this link:
In short steps:
Thank you so much for sharing the above link. Your help is greatly appreciated.
Yay happy to hear 🙌
I fillow the instructions and all requirement already satisfied., however, when I start comfyui I run into this error:
Any tips on how to fix this issue please ?