YanWenKun/ComfyUI-Windows-Portable

Comfy 3D Pack Errors

LucasGauci opened this issue ยท 7 comments

Hello, I keep getting this issue when I try to use any of the Comfy3D nodes

Error occurred when executing [Comfy3D] CRM Images MVDiffusion Model:

Sizes of tensors must match except in dimension 2. Expected size 1000 but got size 64 for tensor number 1 in the list.

File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1792, in run_model
pixel_img = torch_img_to_pil_rgba(reference_image, reference_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\shared_utils\image_utils.py", line 24, in torch_img_to_pil_rgba
single_image = torch.cat((img, mask), dim=2).detach().cpu().numpy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thanks, that fixed that issue but now this error pops up:

Error occurred when executing [Comfy3D] Load Convolutional Reconstruction Model:

DLL load failed while importing nvdiffrast_plugin: The specified module could not be found.

File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1910, in load_CRM
crm_model = CRM(crm_conf).to(device)
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 59, in init
self.renderer = Renderer(tet_grid_size=self.tet_grid_size, camera_angle_num=self.camera_angle_num,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\util\renderer.py", line 15, in init
self.glctx = dr.RasterizeCudaContext()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\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:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1736, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2132, in _import_module_from_library
module = importlib.util.module_from_spec(spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 573, in module_from_spec
File "", line 1233, in create_module
File "", line 241, in _call_with_frames_removed

CRM needs CUDA installed, here's steps:
MrForExample/ComfyUI-3D-Pack#140 (comment)

Thank you for all your assistance, its really appreciated as I have very coding experience and using this from a design background.

Visual Studio and Cuda 12.1 were installed. I added the path to .bat file and that fixed the above error.

Now this error persists:

Error occurred when executing [Comfy3D] Load Convolutional Reconstruction Model:

DLL load failed while importing nvdiffrast_plugin: The specified module could not be found.

File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1910, in load_CRM
crm_model = CRM(crm_conf).to(device)
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 59, in init
self.renderer = Renderer(tet_grid_size=self.tet_grid_size, camera_angle_num=self.camera_angle_num,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\util\renderer.py", line 15, in init
self.glctx = dr.RasterizeCudaContext()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\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:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1736, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2132, in _import_module_from_library
module = importlib.util.module_from_spec(spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 573, in module_from_spec
File "", line 1233, in create_module
File "", line 241, in _call_with_frames_removed

I guess this is still relevant to PATH environment variable.

Make sure you have edited "EDIT_THIS_TO_PATH_TO_YOUR_"

set PATH=%PATH%;C:\EDIT_THIS_TO_PATH_TO_YOUR_\python_embeded\Scripts\

The real working PATH in bat file should be like:

set PATH=%PATH%;D:\Downloads\ComfyUI_Windows_portable\python_embeded\Scripts\

.bat file looks like this:

rem set HTTP_PROXY=http://localhost:1081
rem set HTTPS_PROXY=http://localhost:1081
rem set PYTHONPYCACHEPREFIX=.\pycache
rem .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --disable-auto-launch
set PATH=%PATH%;D:\Downloads\ComfyUI_Windows_portable\python_embeded\Scripts
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
pause

Getting this error now:

Error occurred when executing [Comfy3D] Load Convolutional Reconstruction Model:

Error building extension 'nvdiffrast_plugin': [1/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output texture.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\texture.cu -o texture.cuda.o
FAILED: texture.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output texture.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\texture.cu -o texture.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include\crt/host_config.h(153): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

texture.cu

[2/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output antialias.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\antialias.cu -o antialias.cuda.o
FAILED: antialias.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output antialias.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\antialias.cu -o antialias.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include\crt/host_config.h(153): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

antialias.cu

[3/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output rasterize.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\rasterize.cu -o rasterize.cuda.o
FAILED: rasterize.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output rasterize.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\rasterize.cu -o rasterize.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include\crt/host_config.h(153): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

rasterize.cu

[4/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output RasterImpl.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\cudaraster\impl\RasterImpl.cu -o RasterImpl.cuda.o
FAILED: RasterImpl.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output RasterImpl.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\cudaraster\impl\RasterImpl.cu -o RasterImpl.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include\crt/host_config.h(153): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

RasterImpl.cu

[5/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output interpolate.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\interpolate.cu -o interpolate.cuda.o
FAILED: interpolate.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output interpolate.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=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\Downloads\ComfyUI_Windows_portable\python_embeded\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 -DNVDR_TORCH -lineinfo -c D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\interpolate.cu -o interpolate.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include\crt/host_config.h(153): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

interpolate.cu

ninja: build stopped: subcommand failed.

File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1910, in load_CRM
crm_model = CRM(crm_conf).to(device)
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 59, in init
self.renderer = Renderer(tet_grid_size=self.tet_grid_size, camera_angle_num=self.camera_angle_num,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\util\renderer.py", line 15, in init
self.glctx = dr.RasterizeCudaContext()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\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:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1823, in _write_ninja_file_and_build_library
_run_ninja_build(
File "D:\Downloads\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
raise RuntimeError(message) from e

Try:

  1. Install CUDA Toolkit 12.5.
  2. Check VS 2022 installation. Have C++ Desktop and C++ Linux checked (later is not necessary, just in case).

The key error message is unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported!. I have encountered this error before, it's tricky because it don't show more critical details.

For reference, I have installed latest VS 2022 17.10.0 and CUDA Toolkit 12.4 (latest is 12.5. There's no need to stick with 12.1).