MrForExample / ComfyUI-3D-Pack

An extensive node suite that enables ComfyUI to process 3D inputs (Mesh & UV Texture, etc) using cutting edge algorithms (3DGS, NeRF, etc.)
MIT License
2.42k stars 246 forks source link

Could not locate a supported Microsoft Visual C++ installation? #254

Open ronaldomoon opened 3 months ago

ronaldomoon commented 3 months ago

I have every VC++ redistributable installed. I triple checked.

Yet I get this...

D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-08-06 00:57:42.501162
** Platform: Windows
** Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
** Python executable: D:\ComfyUI_windows_portable\python_embeded\python.exe
** ComfyUI Path: D:\ComfyUI_windows_portable\ComfyUI
** Log path: D:\ComfyUI_windows_portable\comfyui.log

Prestartup times for custom nodes:
   1.6 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 8192 MB, total RAM 32716 MB
pytorch version: 2.3.0+cu121
xformers version: 0.0.26.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 2070 SUPER : cudaMallocAsync
Using xformers cross attention
[Prompt Server] web root: D:\ComfyUI_windows_portable\ComfyUI\web
Warn!: xFormers is available (Attention)
Warn!: Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1941, 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:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\__init__.py", line 53, in <module>
    module = importlib.import_module(f".{nodes_filename}", package=__name__)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "importlib\__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 80, in <module>
    from Unique3D.scripts.project_mesh import multiview_color_projection, get_cameras_list
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\Unique3D\scripts\project_mesh.py", line 98, in <module>
    pix2faces_renderer = Pix2FacesRenderer()
                         ^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\Unique3D\scripts\project_mesh.py", line 70, in __init__
    self._glctx = dr.RasterizeGLContext(output_db=False, device=device)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\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:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 43, in _get_plugin
    raise RuntimeError("Could not locate a supported Microsoft Visual C++ installation")
RuntimeError: Could not locate a supported Microsoft Visual C++ installation

Warn!: Cannot import D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: Could not locate a supported Microsoft Visual C++ installation
### Loading: ComfyUI-Manager (V2.48.5)
### ComfyUI Revision: 2464 [0a6b0081] | Released on '2024-08-04'

Import times for custom nodes:
   0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
   0.3 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
   3.6 seconds (IMPORT FAILED): D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack
sherwoodwoo commented 3 months ago

Add your Microsoft Visual Studio \ 2022 \ Community \ VC \ Tools \ MSVC \ 14.40.33807 \ bin \ Hostx64 \ x64 to the environment variable (system variable)

cwkean87 commented 3 months ago

hi, thaanks. but after setting the variable, i got this error. pls help! thanks

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\cstddef(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory [5/6] cl /showIncludes -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /std:c++17 -DNVDR_TORCH -c D:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\torch_rasterize_gl.cpp /Fotorch_rasterize_gl.o FAILED: torch_rasterize_gl.o cl /showIncludes -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -ID:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc /std:c++17 -DNVDR_TORCH -c D:\ComfyUI_3D\ComfyUI_windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\torch_rasterize_gl.cpp /Fotorch_rasterize_gl.o Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34120 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\cstddef(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory ninja: build stopped: subcommand failed.