Error building extension 'nvdiffrast_plugin_gl': ninja: error: build.ninja:3: lexing error
This problem has been bothering me all day. I have changed many versions of Comfyui, but they are all stuck here
File "D:\program_files\ComfyUIv0.22_3dpack\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 80, in
Warn!: Cannot import D:\program_files\ComfyUIv0.22_3dpack\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: Error building extension 'nvdiffrast_plugin_gl': ninja: error: build.ninja:3: lexing error
I had a similar issue and was able to build nvdiffrast. See this issue https://github.com/MrForExample/ComfyUI-3D-Pack/issues/220#issuecomment-2334815082. It may also help to enable long paths on your machine see this. I have the latest Visual Studio 2022 installed, and my path to cl.exe is C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64.
我遇到了类似的问题,并且能够构建 nvdiffrast。请参阅此问题 #220 (评论)。在您的机器上启用长路径也可能有所帮助,请参阅此内容。我安装了最新的 Visual Studio 2022,我的路径是 。
cl.exe``C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64
Thank you very much. I tried it this afternoon but it still didn't work. I'm not sure if it's because I installed three versions of CUDA. I will provide feedback on the test results
我遇到了类似的问题,并且能够构建 nvdiffrast。请参阅此问题 #220 (评论)。在您的机器上启用长路径也可能有所帮助,请参阅此内容。我安装了最新的 Visual Studio 2022,我的路径是 。
cl.exeC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64 ``Thank you very much. I tried it this afternoon but it still didn't work. I'm not sure if it's because I installed three versions of CUDA. I will provide feedback on the test results
It is indeed an issue with multiple CUDA versions. I blocked all versions except 12.1 in the environment variables, and the problem was solved. Thank you for your answer. I rolled back Studio 2022 to 17.8.6
我遇到了类似的问题,并且能够构建 nvdiffrast。请参阅此问题 #220 (评论)。在您的机器上启用长路径也可能有所帮助,请参阅此内容。我安装了最新的 Visual Studio 2022,我的路径是 。
cl.exeC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64 ``Thank you very much. I tried it this afternoon but it still didn't work. I'm not sure if it's because I installed three versions of CUDA. I will provide feedback on the test results
It is indeed an issue with multiple CUDA versions. I blocked all versions except 12.1 in the environment variables, and the problem was solved. Thank you for your answer. I rolled back Studio 2022 to 17.8.6
I have tried to block CUDA121 and I'm now using CUDA118, but I still have this issue:
Warn!: Traceback (most recent call last):
File "D:\StableDiffusion\ComfyUI_3D\ComfyUI\nodes.py", line 1993, in load_custom_node
module_spec.loader.exec_module(module)
File "
Warn!: Cannot import D:\StableDiffusion\ComfyUI_3D\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: DLL load failed while importing nvdiffrast_plugin_gl: 找不到指定的模块。
我遇到了类似的问题,并且能够构建 nvdiffrast。请参阅此问题 #220 (评论)。在您的机器上启用长路径也可能有所帮助,请参阅此内容。我安装了最新的 Visual Studio 2022,我的路径是 。
cl.exeC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64 ``Thank you very much. I tried it this afternoon but it still didn't work. I'm not sure if it's because I installed three versions of CUDA. I will provide feedback on the test results
It is indeed an issue with multiple CUDA versions. I blocked all versions except 12.1 in the environment variables, and the problem was solved. Thank you for your answer. I rolled back Studio 2022 to 17.8.6
I have tried to block CUDA121 and I'm now using CUDA118, but I still have this issue: Warn!: Traceback (most recent call last): File "D:\StableDiffusion\ComfyUI_3D\ComfyUI\nodes.py", line 1993, 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 "D:\StableDiffusion\ComfyUI_3D\ComfyUI\custom_nodes\ComfyUI-3D-Pack__init_.py", line 53, in module = importlib.import_module(f".{nodes_filename}", package=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib__init__.py", line 126, in import_module 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 "D:\StableDiffusion\ComfyUI_3D\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 "D:\StableDiffusion\ComfyUI_3D\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\Unique3D\scripts\project_mesh.py", line 99, in pix2faces_renderer = Pix2FacesRenderer() ^^^^^^^^^^^^^^^^^^^ File "D:\StableDiffusion\ComfyUI_3D\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 "D:\StableDiffusion\ComfyUI_3D\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 221, in init self.cpp_wrapper = _get_plugin(gl=True).RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx) ^^^^^^^^^^^^^^^^^^^^ File "D:\StableDiffusion\ComfyUI_3D\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 118, in _get_plugin torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False) File "D:\StableDiffusion\ComfyUI_3D\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1312, in load return _jit_compile( ^^^^^^^^^^^^^ File "D:\StableDiffusion\ComfyUI_3D\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1747, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\StableDiffusion\ComfyUI_3D\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2141, in _import_module_from_library module = importlib.util.module_from_spec(spec) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: DLL load failed while importing nvdiffrast_plugin_gl: 找不到指定的模块。
Warn!: Cannot import D:\StableDiffusion\ComfyUI_3D\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: DLL load failed while importing nvdiffrast_plugin_gl: 找不到指定的模块。
Yes, I have this one as well. Fresh Comfy only for this pack, still no go :(
same here
please make sure you have Visual Studio Build Tools installed Installation guide: https://github.com/bycloudai/InstallVSBuildToolsWindows