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.4k stars 245 forks source link

DLL load failed while importing _grid_encoder #68

Open green21st opened 8 months ago

green21st commented 8 months ago

hello,I get this error, how can i solve it?

Error occurred when executing [Comfy3D] Convert 3DGS to Mesh with NeRF and Marching Cubes: DLL load failed while importing _grid_encoder.

MrForExample commented 8 months ago

Hi, you may want to check this issue first, And if you still can't resolve the error, then can I have your full console error log pls? This is not enough information.

green21st commented 8 months ago

sorry, I still haven't found the solution,this is the full log, can you help me, please.
Starting server

To see the GUI go to: http://127.0.0.1:8188 FETCH DATA from: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json got prompt Keyword arguments {'trust_remote_code': True} are not expected by MVDreamPipeline and will be ignored. Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 14.90it/s] D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\models\attention_processor.py:1244: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:263.) hidden_states = F.scaled_dot_product_attention( 100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:02<00:00, 13.23it/s] [Comfy3D] [Load_Large_Multiview_Gaussian_Model] loaded model ckpt from D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints/lgm\model_fp16.safetensors ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1336, in convert_gs_ply converter = GSConverterNeRFMarchingCubes(config_defaults[gs_config], gs_ply).cuda() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 27, in init from kiui.gridencoder import GridEncoder File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder__init__.py", line 1, in from .grid import GridEncoder File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in from .backend import _backend File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in _backend = load( ^^^^^ File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load return _jit_compile( ^^^^^^^^^^^^^ File "D:\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:\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) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: DLL load failed while importing _grid_encoder: 找不到指定的模块。

Prompt executed in 13.56 seconds

MrForExample commented 8 months ago

What install method did you use? pre-build Windows python3.11 cuda 12.1 or Miniconda?

taskinc commented 8 months ago

Hi I have the same error. I installed pre-build Windows python3.11 cuda 12.1.

Error occurred when executing [Comfy3D] Convert 3DGS to Mesh with NeRF and Marching Cubes:

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

File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1336, in convert_gs_ply converter = GSConverterNeRFMarchingCubes(config_defaults[gs_config], gs_ply).cuda() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 27, in init from kiui.gridencoder import GridEncoder File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\python_embeded\Lib\site-packages\kiui\gridencoder__init__.py", line 1, in from .grid import GridEncoder File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in from .backend import _backend File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in _backend = load( ^^^^^ File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load return _jit_compile( ^^^^^^^^^^^^^ File "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\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 "C:\Users\cagri\Desktop\Stable Diffusion\ComfyUI_2\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2132, in _import_module_from_library module = importlib.util.module_from_spec(spec) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

taskinc commented 8 months ago

Solved. I noticed that my CUDA version was 11.8, and I installed Visual Studio 2022 after CUDA. So, the problem is either a CUDA version mismatch or not reinstalling CUDA after the Visual Studio 2022 installation. My solution is:

1.Uninstall CUDA. 2.Check Visual Studio installations. 3.Install and update Visual Studio 2019 & 2022 if necessary. 4.Install CUDA 12.1.

Maybe these instructions should be added to the Windows installation guide