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.14k stars 210 forks source link

ComfyUI Python Embeded Environment ERRORS #61

Closed Dartvauder closed 3 days ago

Dartvauder commented 6 months ago

Hello. I decided to remove the version with Conda and install it for the portable version. But I encountered this errors. Installing ninja via pip install in the comfy manager did not help.

I tried two example worlfows:

Large_Multiview_Gaussian_Model_to_3DGS and_3DMesh.json:

got prompt Keyword arguments {'trust_remote_code': True} are not expected by MVDreamPipeline and will be ignored. Cannot initialize model with low cpu memory usage because accelerate was not found in the environment. Defaulting to low_cpu_mem_usage=False. It is strongly recommended to install accelerate for faster and less memory-intense model loading. You can do so with:

pip install accelerate

. Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:16<00:00, 2.38s/it] D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00, 6.60it/s] [Comfy3D] [Load_Large_Multiview_Gaussian_Model] loaded model ckpt from D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 27, in init from kiui.gridencoder import GridEncoder File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\kiui\gridencoder__init__.py", line 1, in from .grid import GridEncoder File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in from .backend import _backend File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in _backend = load( ^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load return _jit_compile( ^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile _write_ninja_file_and_build_library( File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1793, in _write_ninja_file_and_build_library verify_ninja_availability() File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1842, in verify_ninja_availability raise RuntimeError("Ninja is required to load C++ extensions") RuntimeError: Ninja is required to load C++ extensions

Prompt executed in 55.68 seconds

Triplane_Gaussian_Transformers_to_3DGS_and_3DMesh.json:

Error occurred when executing [Comfy3D] Triplane Gaussian Transformers:

CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1102, in run_TGS gs_ply.extend(tgs_model(batch)) ^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\triplane_gaussian_transformers.py", line 145, in forward out = self._forward(batch) ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\triplane_gaussian_transformers.py", line 95, in _forward out = self.pointcloud_generator(batch) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\pointclouds\simplepoint.py", line 103, in forward up_results = self.pointcloud_upsampling(upsampling_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 187, in forward results = self.decoder(x) ^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 152, in forward up_cond = self.calculate_image_token(points, feat_cond, x) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 119, in calculate_image_token local_features_proj = points_projection( ^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 64, in points_projection fragments = rasterize(Pointclouds(points)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\pytorch3d\renderer\points\rasterizer.py", line 159, in forward idx, zbuf, dists2 = rasterize_points( ^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\pytorch3d\renderer\points\rasterize_points.py", line 131, in rasterize_points return _RasterizePoints.apply( ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply return super().apply(args, kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\pytorch3d\renderer\points\rasterize_points.py", line 212, in forward idx, zbuf, dists = _C.rasterize_points(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^^

I have installed python 3.11.6, CUDA 12.1, Torch 2.2.1, Windows 11, RTX 2060 SUPER 8GB, 32GB RAM, Visual Build Tools 2022

MrForExample commented 6 months ago

Hi friend, thanks for trying it. From your error message: RuntimeError: Ninja is required to load C++ extensions, it seems you don't have Ninja installed which is needed for torch JIT compile cpp extension.

So can you please install/reinstall that first, by running install_windows_portable_win_py311_cu121.bat or using [Your ComfyUI python.exe path] -s -m pip --force-reinstall ninja

MauriceBourdon commented 6 months ago

Hi, I tried to install into a fresh ComfyUI_Windows_Portable (Windows 11) The workflow (Large_Multiview_Gaussian_Model_to_3DGS and_3DMesh) can be launched but I have an error with the node (Convert to 3DGS...). I tried without success " install/reinstall that first, by running install_windows_portable_win_py311_cu121.bat or using [Your ComfyUI python.exe path] -s -m pip --force-reinstall ninja"

Please find the error displayed

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

Ninja is required to load C++ extensions

File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder__init__.py", line 1, in from .grid import GridEncoder File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in from .backend import _backend File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 63, in _backend = load( ^^^^^ File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load return _jit_compile( ^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1793, in _write_ninja_file_and_build_library verify_ninja_availability() File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1842, in verify_ninja_availability raise RuntimeError("Ninja is required to load C++ extensions")

Thanks !!

MrForExample commented 6 months ago

@MauriceBourdon Hi, it seems you got the same error. Did you run the following command? D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install --force-reinstall ninja

Also please check if your VS Build tool is installed correctly.

And if you have any issue when install Ninja, then following are good source to resolve it:

MauriceBourdon commented 6 months ago

Hi, Thanks ! The problem was the Path (in variable environment) Now, I have a new error with "sklearn" (Sorry I'm not developper) Maybe the problem ? --> https://github.com/scikit-learn/sklearn-pypi-package

Error displayed :

[INFO] finished fitting mesh! [INFO] uv unwrapping... [INFO] querying texture... ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1339, in convert_gs_ply converter.fit_mesh_uv() File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 376, in fit_mesh_uv albedo = uv_padding(albedo, mask, padding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\op.py", line 186, in uv_padding from sklearn.neighbors import NearestNeighbors ModuleNotFoundError: No module named 'sklearn'

Dartvauder commented 6 months ago

Hi friend, thanks for trying it. From your error message: RuntimeError: Ninja is required to load C++ extensions, it seems you don't have Ninja installed which is needed for torch JIT compile cpp extension.

So can you please install/reinstall that first, by running install_windows_portable_win_py311_cu121.bat or using [Your ComfyUI python.exe path] -s -m pip --force-reinstall ninja

Thank you for answering. The error disappeared but a new one appeared:

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

Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 4.63 GiB Requested : 506.12 GiB Device limit : 8.00 GiB Free (according to CUDA): 1.48 GiB PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1337, in convert_gs_ply converter.fit_nerf() File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 174, in fit_nerf image_gt, alpha_gt = self.render_gs(pose) ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 80, in render_gs out = self.gs_renderer.render(self.gaussians.unsqueeze(0), cam_view.unsqueeze(0), cam_view_proj.unsqueeze(0), cam_pos.unsqueeze(0)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\lgm\core\gs.py", line 76, in render rendered_image, radii, rendered_depth, rendered_alpha = rasterizer( ^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterization__init.py", line 213, in forward return rasterize_gaussians( ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterization\init__.py", line 32, in rasterize_gaussians return _RasterizeGaussians.apply( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply return super().apply(args, *kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterization__init__.py", line 92, in forward num_rendered, color, depth, alpha, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On the miniconda version everything worked as it should

Dartvauder commented 6 months ago

This is also the error the Triplane Gaussian method gives me:

Error occurred when executing [Comfy3D] Triplane Gaussian Transformers:

CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1102, in run_TGS gs_ply.extend(tgs_model(batch)) ^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\triplane_gaussian_transformers.py", line 145, in forward out = self._forward(batch) ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\triplane_gaussian_transformers.py", line 95, in _forward out = self.pointcloud_generator(batch) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\pointclouds\simplepoint.py", line 103, in forward up_results = self.pointcloud_upsampling(upsampling_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 187, in forward results = self.decoder(x) ^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 152, in forward up_cond = self.calculate_image_token(points, feat_cond, x) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 119, in calculate_image_token local_features_proj = points_projection( ^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\model_spdpp.py", line 64, in points_projection fragments = rasterize(Pointclouds(points)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\pytorch3d\renderer\points\rasterizer.py", line 159, in forward idx, zbuf, dists2 = rasterize_points( ^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\pytorch3d\renderer\points\rasterize_points.py", line 131, in rasterize_points return _RasterizePoints.apply( ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply return super().apply(args, kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\pytorch3d\renderer\points\rasterize_points.py", line 212, in forward idx, zbuf, dists = _C.rasterize_points(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^^

MrForExample commented 6 months ago

Hi, Thanks ! The problem was the Path (in variable environment) Now, I have a new error with "sklearn" (Sorry I'm not developper) Maybe the problem ? --> https://github.com/scikit-learn/sklearn-pypi-package

Error displayed :

[INFO] finished fitting mesh! [INFO] uv unwrapping... [INFO] querying texture... ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1339, in convert_gs_ply converter.fit_mesh_uv() File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 376, in fit_mesh_uv albedo = uv_padding(albedo, mask, padding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\op.py", line 186, in uv_padding from sklearn.neighbors import NearestNeighbors ModuleNotFoundError: No module named 'sklearn'

Hi, seems the sklearn is missing: D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install --force-reinstall

MrForExample commented 6 months ago

Hi friend, thanks for trying it. From your error message: RuntimeError: Ninja is required to load C++ extensions, it seems you don't have Ninja installed which is needed for torch JIT compile cpp extension. So can you please install/reinstall that first, by running install_windows_portable_win_py311_cu121.bat or using [Your ComfyUI python.exe path] -s -m pip --force-reinstall ninja

Thank you for answering. The error disappeared but a new one appeared:

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

Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 4.63 GiB Requested : 506.12 GiB Device limit : 8.00 GiB Free (according to CUDA): 1.48 GiB PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1337, in convert_gs_ply converter.fit_nerf() File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 174, in fit_nerf image_gt, alpha_gt = self.render_gs(pose) ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 80, in render_gs out = self.gs_renderer.render(self.gaussians.unsqueeze(0), cam_view.unsqueeze(0), cam_view_proj.unsqueeze(0), cam_pos.unsqueeze(0)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\lgm\core\gs.py", line 76, in render rendered_image, radii, rendered_depth, rendered_alpha = rasterizer( ^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterizationinit.py", line 213, in forward return rasterize_gaussians( ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterizationinit.py", line 32, in rasterize_gaussians return _RasterizeGaussians.apply( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply return super().apply(args, *kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterizationinit.py", line 92, in forward num_rendered, color, depth, alpha, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On the miniconda version everything worked as it should

This is rather wired, I'm not sure what could cause 506.12 GiB request issue. What kind of GPU you are using? It seems you may have CUDA issue because pytorch build you installed doesn't support your GPU card

Dartvauder commented 6 months ago

Hi friend, thanks for trying it. From your error message: RuntimeError: Ninja is required to load C++ extensions, it seems you don't have Ninja installed which is needed for torch JIT compile cpp extension. So can you please install/reinstall that first, by running install_windows_portable_win_py311_cu121.bat or using [Your ComfyUI python.exe path] -s -m pip --force-reinstall ninja

Thank you for answering. The error disappeared but a new one appeared:

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

Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 4.63 GiB Requested : 506.12 GiB Device limit : 8.00 GiB Free (according to CUDA): 1.48 GiB PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\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:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1337, in convert_gs_ply converter.fit_nerf() File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 174, in fit_nerf image_gt, alpha_gt = self.render_gs(pose) ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 80, in render_gs out = self.gs_renderer.render(self.gaussians.unsqueeze(0), cam_view.unsqueeze(0), cam_view_proj.unsqueeze(0), cam_pos.unsqueeze(0)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\ComfyUI\custom_nodes\ComfyUI-3D-Pack\lgm\core\gs.py", line 76, in render rendered_image, radii, rendered_depth, rendered_alpha = rasterizer( ^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterizationinit.py", line 213, in forward return rasterize_gaussians( ^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterizationinit.py", line 32, in rasterize_gaussians return _RasterizeGaussians.apply( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply return super().apply(args, *kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\OpenSource\NeuralNetworks\ImageVideoGeneration\ComfyWebUI\python_embeded\Lib\site-packages\diff_gaussian_rasterizationinit.py", line 92, in forward num_rendered, color, depth, alpha, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On the miniconda version everything worked as it should

This is rather wired, I'm not sure what could cause 506.12 GiB request issue. What kind of GPU you are using? It seems you may have CUDA issue because pytorch build you installed doesn't support your GPU card

RTX 2060 SUPER 8GB, 32GB RAM, CUDA 12.1 + TORCH 2.2.0

MauriceBourdon commented 6 months ago

Hi, I found the solution You need to install scikit-learn instead of sklearn (https://github.com/scikit-learn/sklearn-pypi-package) Now, it works well !! Thanks for your time and your help !!!

Just a little problem After the first generation, need to reload json file to get the preview 3DMesh and 3DGS

imageto3D imageto3D2
MrForExample commented 6 months ago

Hi, I found the solution You need to install scikit-learn instead of sklearn (https://github.com/scikit-learn/sklearn-pypi-package) Now, it works well !! Thanks for your time and your help !!!

Just a little problem After the first generation, need to reload json file to get the preview 3DMesh and 3DGS

imageto3D imageto3D2

Glad you solved it, I just realized I didn't finish typing command in my reply 😅 sorry about that

Dartvauder commented 6 months ago

Hi, I found the solution You need to install scikit-learn instead of sklearn (https://github.com/scikit-learn/sklearn-pypi-package) Now, it works well !! Thanks for your time and your help !!!

Just a little problem After the first generation, need to reload json file to get the preview 3DMesh and 3DGS

imageto3D imageto3D2

Glad you solved it, I just realized I didn't finish typing command in my reply 😅 sorry about that

Sorry but, what could be my problem?

MrForExample commented 6 months ago

Hi, I found the solution You need to install scikit-learn instead of sklearn (https://github.com/scikit-learn/sklearn-pypi-package) Now, it works well !! Thanks for your time and your help !!! Just a little problem After the first generation, need to reload json file to get the preview 3DMesh and 3DGS imageto3D imageto3D2

Glad you solved it, I just realized I didn't finish typing command in my reply 😅 sorry about that

Sorry but, what could be my problem?

Apologies, but I'm not really sure what could be the cause at your end, is the example workflow works in your environment? if so then if you can share your workflow and the input data your are using then I maybe able to help you debug.

MauriceBourdon commented 6 months ago

Hi MrForExample,

The Worflow is your Large_Multiview_Gaussian_Model_to_3DGS and_3DMesh.json (without edit) Attached the files used : rmbg_00051_ rmbg_00007_

mothormothormothor commented 6 months ago

I'm getting a similar error when using the same workflow, at least seems like it's also ninja related:

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


Error building extension '_grid_encoder': [1/3] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o 
FAILED: gridencoder.cuda.o 
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o 
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_OPERATORS__" wird durch "/U__CUDA_NO_HALF_OPERATORS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_CONVERSIONS__" wird durch "/U__CUDA_NO_HALF_CONVERSIONS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF2_OPERATORS__" wird durch "/U__CUDA_NO_HALF2_OPERATORS__" überschrieben
gridencoder.cu
C:/Users/Marvin/ComfyUI_windows_portable/python_embeded/Lib/site-packages/torch/include\torch/csrc/python_headers.h(12): fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "Python.h": No such file or directory

gridencoder.cu

[2/3] cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o 
FAILED: bindings.o 
cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o 
Microsoft (R) C/C++-Optimierungscompiler Version 19.39.33521 für x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\__init__.py", line 1, in 
    from .grid import GridEncoder
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in 
    from .backend import _backend
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in 
    _backend = load(
               ^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
    raise RuntimeError(message) from e
MrForExample commented 6 months ago

Hi MrForExample,

The Worflow is your Large_Multiview_Gaussian_Model_to_3DGS and_3DMesh.json (without edit) Attached the files used : rmbg_00051_ rmbg_00007_

Oh, thanks, no worries, I was asking @Dartvauder's issue

MrForExample commented 6 months ago

I'm getting a similar error when using the same workflow, at least seems like it's also ninja related:

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


Error building extension '_grid_encoder': [1/3] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o 
FAILED: gridencoder.cuda.o 
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o 
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_OPERATORS__" wird durch "/U__CUDA_NO_HALF_OPERATORS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_CONVERSIONS__" wird durch "/U__CUDA_NO_HALF_CONVERSIONS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF2_OPERATORS__" wird durch "/U__CUDA_NO_HALF2_OPERATORS__" überschrieben
gridencoder.cu
C:/Users/Marvin/ComfyUI_windows_portable/python_embeded/Lib/site-packages/torch/include\torch/csrc/python_headers.h(12): fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "Python.h": No such file or directory

gridencoder.cu

[2/3] cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o 
FAILED: bindings.o 
cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o 
Microsoft (R) C/C++-Optimierungscompiler Version 19.39.33521 für x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\__init__.py", line 1, in 
    from .grid import GridEncoder
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in 
    from .backend import _backend
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in 
    _backend = load(
               ^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
    raise RuntimeError(message) from e

Hi, can you show me the full errors? Also have you tried the solution works for @MauriceBourdon ?

mothormothormothor commented 6 months ago

I'm getting a similar error when using the same workflow, at least seems like it's also ninja related: Error occurred when executing [Comfy3D] Convert 3DGS to Mesh with NeRF and Marching Cubes:


Error building extension '_grid_encoder': [1/3] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o 
FAILED: gridencoder.cuda.o 
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o 
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_OPERATORS__" wird durch "/U__CUDA_NO_HALF_OPERATORS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_CONVERSIONS__" wird durch "/U__CUDA_NO_HALF_CONVERSIONS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF2_OPERATORS__" wird durch "/U__CUDA_NO_HALF2_OPERATORS__" überschrieben
gridencoder.cu
C:/Users/Marvin/ComfyUI_windows_portable/python_embeded/Lib/site-packages/torch/include\torch/csrc/python_headers.h(12): fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "Python.h": No such file or directory

gridencoder.cu

[2/3] cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o 
FAILED: bindings.o 
cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o 
Microsoft (R) C/C++-Optimierungscompiler Version 19.39.33521 für x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\__init__.py", line 1, in 
    from .grid import GridEncoder
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in 
    from .backend import _backend
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in 
    _backend = load(
               ^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
    raise RuntimeError(message) from e

Hi, can you show me the full errors? Also have you tried the solution works for @MauriceBourdon ?

Thanks for the quick response :)

The full error is so damn long, i provided a google doc. It's the full error from the Comfy GUI. The error message from the Terminal is basically the same but with this line at the end:

C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/python_headers.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "Python.h": No such file or directory
ninja: build stopped: subcommand failed.

I installed scikit-learn from the @MauriceBourdon s solution but nothing changed. Do I have do install the scikit-learn in a specific directory?

mothormothormothor commented 6 months ago

Edit: when queing a prompt after getting the first error message, I get a new one:

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

DLL load failed while importing _grid_encoder: Das angegebene Modul wurde nicht gefunden.

  File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\__init__.py", line 1, in 
    from .grid import GridEncoder
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in 
    from .backend import _backend
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in 
    _backend = load(
               ^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
MrForExample commented 6 months ago

@mothormothormothor

Hi, for this error:

C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/python_headers.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "Python.h": No such file or directory
ninja: build stopped: subcommand failed.

You need to copy two folders inside _Python311_cpp to C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\, this should be done automatically if you run install_windows_portable_win_py311_cu121.bat.

mothormothormothor commented 6 months ago

thank you! I copied the folders but got the same error as the the other guys in this issue:


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

Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated     : 4.61 GiB
Requested               : 202.77 GiB
Device limit            : 8.00 GiB
Free (according to CUDA): 1.53 GiB
PyTorch limit (set by user-supplied memory fraction)
                        : 17179869184.00 GiB

  File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1337, in convert_gs_ply
    converter.fit_nerf()
  File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 174, in fit_nerf
    image_gt, alpha_gt = self.render_gs(pose)
                         ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 80, in render_gs
    out = self.gs_renderer.render(self.gaussians.unsqueeze(0), cam_view.unsqueeze(0), cam_view_proj.unsqueeze(0), cam_pos.unsqueeze(0))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\lgm\core\gs.py", line 76, in render
    rendered_image, radii, rendered_depth, rendered_alpha = rasterizer(
                                                            ^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diff_gaussian_rasterization\__init__.py", line 213, in forward
    return rasterize_gaussians(
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diff_gaussian_rasterization\__init__.py", line 32, in rasterize_gaussians
    return _RasterizeGaussians.apply(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\autograd\function.py", line 553, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diff_gaussian_rasterization\__init__.py", line 92, in forward
    num_rendered, color, depth, alpha, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(*args)
                                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Queue size: 0
Extra options

I only have an RTX2070 available. Is the GPU not powerful enough to run this locally or is there a specific setting to use less memory? I already tried to set gs_config totiny but the error stays.

I'm using Python 3.11.7 and CUDA 12.1 on Win 10

I normally avoid to run stuff locally but use Colab instead. I already tried the guide from @lovisdotio but it doesn't seem to work properly. I might contact him for a full explanation if my GPU is to weak.

DanielTheurich commented 6 months ago

@MauriceBourdon I am encountering the same problem with sklearn. You mentioned that you fixed it here: https://github.com/MrForExample/ComfyUI-3D-Pack/issues/61#issuecomment-1966859073

I am having some difficulties. I run: pip install scikit-learn but the same error with "sklearn" appears when I try to run the setup in Comfyui. On the github page for scikit-learn I see it says something about needing to "replace sklearn by scikit-learn in your pip requirements files." Is this what you did to make it work? If it is please let me know where these files were located for you. I have yet to find them Thank you.

mothormothormothor commented 6 months ago
> Hi, Thanks ! The problem was the Path (in variable environment) Now, I have a new error with "sklearn" (Sorry I'm not developper) Maybe the problem ? --> https://github.com/scikit-learn/sklearn-pypi-package
> 
> Error displayed :
> 
> [INFO] finished fitting mesh! [INFO] uv unwrapping... [INFO] querying texture... ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\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:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1339, in convert_gs_ply converter.fit_mesh_uv() File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\nerf_marching_cubes_converter.py", line 376, in fit_mesh_uv albedo = uv_padding(albedo, mask, padding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\op.py", line 186, in uv_padding from sklearn.neighbors import NearestNeighbors ModuleNotFoundError: No module named 'sklearn'

Hey @MauriceBourdon can you explain how you changed the PATH specifically? I cant't get past this error, when executing the Triplane Worklfow:

CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
mothormothormothor commented 6 months ago

@mothormothormothor

Hi, for this error:

C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/python_headers.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "Python.h": No such file or directory
ninja: build stopped: subcommand failed.

You need to copy two folders inside _Python311_cpp to C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\, this should be done automatically if you run install_windows_portable_win_py311_cu121.bat.

Hey again with an update: tried to fix the Path environment and also did the force reinstall for ninja. Got this error after executing [Comfy3D] Convert 3DGS to Mesh with NeRF and Marching Cubes:

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2096, in _run_ninja_build
    subprocess.run(
  File "subprocess.py", line 571, in run
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 "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\__init__.py", line 1, in <module>
    from .grid import GridEncoder
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in <module>
    from .backend import _backend
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in <module>
    _backend = load(
               ^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension '_grid_encoder': [1/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o
FAILED: gridencoder.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_OPERATORS__" wird durch "/U__CUDA_NO_HALF_OPERATORS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_CONVERSIONS__" wird durch "/U__CUDA_NO_HALF_CONVERSIONS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF2_OPERATORS__" wird durch "/U__CUDA_NO_HALF2_OPERATORS__" überschrieben
gridencoder.cu
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\crtdefs.h(10): fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "corecrt.h": No such file or directory
gridencoder.cu
ninja: build stopped: subcommand failed.

I copied the folders from _Python311_cpp in the correct directory.

MauriceBourdon commented 6 months ago

Hi @mothormothormothor Copy the path (for me --> D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Scripts) And paste it in environment variable See attached screens

environment-variables edit-environment-variables add-new-envrionment-variable

MauriceBourdon commented 6 months ago

Hi @DanielTheurich I just put in Terminal (with the good path) D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install --force-reinstall scikit-learn The folder [scikit_learn-1.4.1.post1.dist-info] --> D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\Lib\site-packages

Sorry I'm not a developer I hope it helps you anyway

mothormothormothor commented 6 months ago

Hi @MauriceBourdon thanks for your detailed explanation. I decided to start from scratch and installed a fresh version of Comfy, CUDA, VS and Torch. I added everything to the Path as mentioned and also force installed ninja. Sadly I still get an error:

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2096, in _run_ninja_build
    subprocess.run(
  File "subprocess.py", line 571, in run
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 "C:\Users\Marvin\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\__init__.py", line 1, in <module>
    from .grid import GridEncoder
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\grid.py", line 9, in <module>
    from .backend import _backend
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\backend.py", line 48, in <module>
    _backend = load(
               ^^^^^
  File "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
    return _jit_compile(
           ^^^^^^^^^^^^^
  File "C:\Users\Marvin\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 "C:\Users\Marvin\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 "C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension '_grid_encoder': [1/3] cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o
FAILED: bindings.o
cl /showIncludes -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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 /O2 /std:c++17 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\bindings.cpp /Fobindings.o
Microsoft (R) C/C++-Optimierungscompiler Version 19.39.33521 für x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Hinweis: Einlesen der Datei: C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/extension.h
Hinweis: Einlesen der Datei:  C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include\torch/all.h
Hinweis: Einlesen der Datei:   C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include\torch/autograd.h
Hinweis: Einlesen der Datei:    C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/autograd/autograd.h
Hinweis: Einlesen der Datei:     C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/autograd/variable.h
Hinweis: Einlesen der Datei:      C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/utils/python_stub.h
Hinweis: Einlesen der Datei:      C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/Export.h
Hinweis: Einlesen der Datei:       C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\c10/macros/Export.h
Hinweis: Einlesen der Datei:        C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\c10/macros/cmake_macros.h
Hinweis: Einlesen der Datei:      C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/autograd/cpp_hook.h
Hinweis: Einlesen der Datei:       C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch/csrc/autograd/function_hook.h
Hinweis: Einlesen der Datei:        C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\ATen/Tensor.h
Hinweis: Einlesen der Datei:         C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\ATen/core/Tensor.h
Hinweis: Einlesen der Datei:          C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\ATen/core/TensorBody.h
Hinweis: Einlesen der Datei:           C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\c10/core/Device.h
Hinweis: Einlesen der Datei:            C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\c10/core/DeviceType.h
Hinweis: Einlesen der Datei:             C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\functional
Hinweis: Einlesen der Datei:              C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\yvals_core.h
Hinweis: Einlesen der Datei:               C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\vcruntime.h
Hinweis: Einlesen der Datei:                C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\sal.h
Hinweis: Einlesen der Datei:                 C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\concurrencysal.h
Hinweis: Einlesen der Datei:                C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\vadefs.h
Hinweis: Einlesen der Datei:               C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\xkeycheck.h
Hinweis: Einlesen der Datei:              C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\exception
Hinweis: Einlesen der Datei:               C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\yvals.h
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\yvals.h(20): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "crtdbg.h": No such file or directory
[2/3] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o
FAILED: gridencoder.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output gridencoder.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=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\Marvin\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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c C:\Users\Marvin\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kiui\gridencoder\src\gridencoder.cu -o gridencoder.cuda.o
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_OPERATORS__" wird durch "/U__CUDA_NO_HALF_OPERATORS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF_CONVERSIONS__" wird durch "/U__CUDA_NO_HALF_CONVERSIONS__" überschrieben
cl : Befehlszeile warning D9025 : "/D__CUDA_NO_HALF2_OPERATORS__" wird durch "/U__CUDA_NO_HALF2_OPERATORS__" überschrieben
gridencoder.cu
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\crtdefs.h(10): fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "corecrt.h": No such file or directory
gridencoder.cu
ninja: build stopped: subcommand failed.

Is it possible that there is still something wrong with my Path Environment? I added screenshots (1. is user variables, 2. system variables). Thank you for taking the time! path_1_error path_2_error

DanielTheurich commented 6 months ago

Thank you @MauriceBourdon, running this actually fixed it this time: D:\IA\ComfyUI Dream\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install --force-reinstall scikit-learn

I first uninstalled any previous versions of scikit-learn and then ran the command. Now it works. Thank you.

SergioKingOne commented 4 months ago

@MauriceBourdon Hey there, were you able to resolve the CUDA Kernel Issue? I was having the same issue and got rid of the message itself, but the effect and where it happens I think is still the same; it crashes ComfyUI right after "Running TripoSR" message, just that this times does not display the CUDA Kernel error message.

q576333 commented 3 months ago

I'm running into the same "Error building extension '_grid_encoder'" issue as @mothormothormothor when using Convert 3DGS to Mesh with NeRF and Marching Cubes. However, I've encountered an additional error message: "[WInErr] fatal error C1189: #error: -- unsupported Microsoft Visual Studio version!"

To address this, I followed the instructions outlined in this GitHub issue (https://github.com/nerfstudio-project/nerfstudio/issues/3171) to change the Visual Studio build tool version from 17.10 to 17.9. While this change allowed the build to succeed, I'm now facing a new error, which I've highlighted in bold below.

Number of points at loading : 47731 [INFO] fitting nerf... MSE = 0.000356: 100%|████████████████████████████████████████████████████████████████| 512/512 [00:57<00:00, 8.98it/s] [INFO] finished fitting nerf! [INFO] marching cubes thresh: 10 (0.17477001249790192 ~ 445.35498046875) [INFO] mesh cleaning: (55864, 3) --> (30576, 3), (111676, 3) --> (61148, 3) [INFO] mesh decimation: (30576, 3) --> (25002, 3), (61148, 3) --> (50000, 3) [INFO] fitting mesh... 0%| | 0/2048 [00:00<?, ?it/s] !!! Exception during processing!!! Cuda error: 304[cudaGraphicsGLRegisterBuffer(&s.cudaPosBuffer, s.glPosBuffer, cudaGraphicsRegisterFlagsWriteDiscard);]

@MrForExample, could you elaborate on your Visual Studio build tool version and your experience with this Cuda error? According to this issue (https://github.com/sicxu/Deep3DFaceRecon_pytorch/issues/164), it seems very relate to build tool version. Thanks for your help.

jaunkst commented 1 month ago

I get a similar error when trying to start up RuntimeError: Cuda error: 304[cudaGraphicsGLRegisterBuffer(&s.cudaPosBuffer, s.glPosBuffer, cudaGraphicsRegisterFlagsWriteDiscard);]

Warn!: Cannot import /home/wildfire/ComfyUI/custom_nodes/ComfyUI-3D-Pack module for custom nodes: Cuda error: 304[cudaGraphicsGLRegisterBuffer(&s.cudaPosBuffer, s.glPosBuffer, cudaGraphicsRegisterFlagsWriteDiscard);]