ComfyUI-3D-Pack icon indicating copy to clipboard operation
ComfyUI-3D-Pack copied to clipboard

install fails

Open Elminsst opened this issue 1 year ago • 3 comments

File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\utils\cpp_extension.py", line 2104, in _run_ninja_build subprocess.run( File "E:\ComfyUI-K\ComfyUI.ext\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 "E:\ComfyUI-K\ComfyUI\nodes.py", line 2037, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in call_with_frames_removed File "E:\ComfyUI-K\ComfyUI\custom_nodes\ComfyUI-3D-Pack_init.py", line 53, in module = importlib.import_module(f".{nodes_filename}", package=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-K\ComfyUI.ext\Lib\importlib_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "E:\ComfyUI-K\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 82, in from Unique3D.scripts.project_mesh import multiview_color_projection, multiview_color_projection_texture, get_cameras_list, get_orbit_cameras_list File "E:\ComfyUI-K\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\Unique3D\scripts\project_mesh.py", line 99, in pix2faces_renderer = Pix2FacesRenderer() ^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-K\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\Unique3D\scripts\project_mesh.py", line 71, in init self._glctx = dr.RasterizeGLContext(output_db=False, device=device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\nvdiffrast\torch\ops.py", line 228, in init self.cpp_wrapper = _get_plugin(gl=True).RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx) ^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\nvdiffrast\torch\ops.py", line 125, in _get_plugin torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=common_opts+cc_opts, extra_cuda_cflags=common_opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False) File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\utils\cpp_extension.py", line 1314, in load return _jit_compile( ^^^^^^^^^^^^^ File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\utils\cpp_extension.py", line 1721, in _jit_compile _write_ninja_file_and_build_library( File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\utils\cpp_extension.py", line 1833, in _write_ninja_file_and_build_library _run_ninja_build( File "E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\utils\cpp_extension.py", line 2120, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error building extension 'nvdiffrast_plugin_gl': [1/1] "E:\ComfyUI-K\ComfyUI.msvc\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64/link.exe" common.o glutil.o rasterize_gl.o torch_bindings_gl.o torch_rasterize_gl.o /nologo /DLL /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\nvdiffrast\torch..\lib /DEFAULTLIB:gdi32 /DEFAULTLIB:opengl32 /DEFAULTLIB:user32 /DEFAULTLIB:setgpu c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" cudart.lib /out:nvdiffrast_plugin_gl.pyd

FAILED: nvdiffrast_plugin_gl.pyd

"E:\ComfyUI-K\ComfyUI.msvc\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64/link.exe" common.o glutil.o rasterize_gl.o torch_bindings_gl.o torch_rasterize_gl.o /nologo /DLL /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\nvdiffrast\torch..\lib /DEFAULTLIB:gdi32 /DEFAULTLIB:opengl32 /DEFAULTLIB:user32 /DEFAULTLIB:setgpu c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" cudart.lib /out:nvdiffrast_plugin_gl.pyd

LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'

ninja: build stopped: subcommand failed.

Warn!: Cannot import E:\ComfyUI-K\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: Error building extension 'nvdiffrast_plugin_gl': [1/1] "E:\ComfyUI-K\ComfyUI.msvc\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64/link.exe" common.o glutil.o rasterize_gl.o torch_bindings_gl.o torch_rasterize_gl.o /nologo /DLL /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\nvdiffrast\torch..\lib /DEFAULTLIB:gdi32 /DEFAULTLIB:opengl32 /DEFAULTLIB:user32 /DEFAULTLIB:setgpu c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" cudart.lib /out:nvdiffrast_plugin_gl.pyd

FAILED: nvdiffrast_plugin_gl.pyd

"E:\ComfyUI-K\ComfyUI.msvc\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64/link.exe" common.o glutil.o rasterize_gl.o torch_bindings_gl.o torch_rasterize_gl.o /nologo /DLL /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\nvdiffrast\torch..\lib /DEFAULTLIB:gdi32 /DEFAULTLIB:opengl32 /DEFAULTLIB:user32 /DEFAULTLIB:setgpu c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\Lib\site-packages\torch\lib torch_python.lib /LIBPATH:E:\ComfyUI-K\ComfyUI.ext\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" cudart.lib /out:nvdiffrast_plugin_gl.pyd

LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'

ninja: build stopped: subcommand failed.

how to fix this?

Elminsst avatar Dec 05 '24 03:12 Elminsst

Hi @Elminsst, sorry for the late responds There are a few nodes need runtime C++ compile You can check if your Visual Studio Build Tools 2022/2019 if installed correctly And double click C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat

MrForExample avatar Dec 10 '24 22:12 MrForExample

image Which of these options is correct? Or do they all need to be installed? Or I need to install this one? image

Elminsst avatar Dec 11 '24 01:12 Elminsst

@MrForExample I'm facing a similar issue on Linux. Any idea what the solution there might be?

hirad avatar Jan 22 '25 17:01 hirad

Guide for vs tools installation: https://github.com/bycloudai/InstallVSBuildToolsWindows Try to install the new version of 3D-Pack

DenisKochetov avatar Jun 16 '25 10:06 DenisKochetov