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
1.72k stars 165 forks source link

ModuleNotFoundError: No module named 'kiui' #152

Open WhiteKnight666 opened 1 month ago

WhiteKnight666 commented 1 month ago

Failed.... Traceback (most recent call last): File "E:\Stable diffusion\comfyui\nodes.py", line 1879, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "E:\Stable diffusion\comfyui\custom_nodes\ComfyUI-3D-Pack__init.py", line 28, in module = importlib.import_module(f".{nodes_filename}", package=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Stable diffusion\comfyui.ext\Lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "E:\Stable diffusion\comfyui\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 22, in from .mesh_processer.mesh import Mesh File "E:\Stable diffusion\comfyui\custom_nodes\ComfyUI-3D-Pack\mesh_processer\mesh.py", line 8, in from kiui.op import safe_normalize, dot ModuleNotFoundError: No module named 'kiui'

Cannot import E:\Stable diffusion\comfyui\custom_nodes\ComfyUI-3D-Pack module for custom nodes: No module named 'kiui'

MrForExample commented 1 month ago

Hi, if you have problem using pre-build wheels for kiuikit library then please try following: pip install git+https://github.com/ashawkey/kiuikit.git

Pupazzzz commented 1 month ago

Same problem here.

I've tried:

pip install git+https://github.com/ashawkey/kiuikit.git pip install kiui pip install kiui[full]

and still not import the 3D-Pack with the same identical errors that @WhiteKnight666 wrote.

renwerx commented 1 month ago

I installed kiui through the experimental option "install PIP packages" in the manager by pasting "kiui" (no quotes) into the dialogue box and clicking OK. That fixed the original error however I'm now getting the following:

File "K:\Programs\ComfyUI\nodes.py", line 1879, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "K:\Programs\ComfyUI\custom_nodes\ComfyUI-3D-Pack__init.py", line 28, in module = importlib.import_module(f".{nodes_filename}", package=name) File "K:\Programs\python\3.10.6\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "K:\Programs\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 33, in from .algorithms.main_3DGS import GaussianSplatting, GaussianSplattingCameraController, GSParams File "K:\Programs\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\main_3DGS.py", line 12, in from .main_3DGS_renderer import GaussianSplattingRenderer File "K:\Programs\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\main_3DGS_renderer.py", line 24, in from diff_gaussian_rasterization import ( ModuleNotFoundError: No module named 'diff_gaussian_rasterization'

MrForExample commented 1 month ago

Same problem here.

I've tried:

pip install git+https://github.com/ashawkey/kiuikit.git pip install kiui pip install kiui[full]

and still not import the 3D-Pack with the same identical errors that @WhiteKnight666 wrote.

If you didn't get any error when install kiuikit then it probably means your comfy python environment is not you OS default python environment and you installed it into OS default python environment, you should run:

[Path to your comfy python.exe] -s -m pip install git+https://github.com/ashawkey/kiuikit.git e.g. C:\Users\reall\Softwares\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install git+https://github.com/ashawkey/kiuikit.git

maxious commented 1 month ago

If you install this via comfyui-manager, you'll need to manually install the prebuilt wheels appropriate to your environment afterwards eg. for windows/python3.11/cuda 12.1

cd C:\ComfyUI_windows_portable\python_embeded\
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\diff_gaussian_rasterization-0.0.0-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\kiui-0.2.4-py3-none-any.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\nvdiffrast-0.3.1-py3-none-any.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\pointnet2_ops-3.0.0-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\pytorch3d-0.7.6-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\simple_knn-0.0.0-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\torch_scatter-2.1.2-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\torchmcubes-0.1.0-cp311-cp311-win_amd64.whl
Pupazzzz commented 1 month ago

Same problem here. I've tried: pip install git+https://github.com/ashawkey/kiuikit.git pip install kiui pip install kiui[full] and still not import the 3D-Pack with the same identical errors that @WhiteKnight666 wrote.

If you didn't get any error when install kiuikit then it probably means your comfy python environment is not you OS default python environment and you installed it into OS default python environment, you should run:

[Path to your comfy python.exe] -s -m pip install git+https://github.com/ashawkey/kiuikit.git e.g. C:\Users\reall\Softwares\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install git+https://github.com/ashawkey/kiuikit.git

I've try your advice and this is what i get:

PS C:\Users\gabri> C:\Users\gabri\Desktop\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install git+https://github.com/ashawkey/kiuikit.git Collecting git+https://github.com/ashawkey/kiuikit.git Cloning https://github.com/ashawkey/kiuikit.git to c:\users\gabri\appdata\local\temp\pip-req-build-z7jvnhqf Running command git clone --filter=blob:none --quiet https://github.com/ashawkey/kiuikit.git 'C:\Users\gabri\AppData\Local\Temp\pip-req-build-z7jvnhqf' Resolved https://github.com/ashawkey/kiuikit.git to commit 352321339e0d055e92ea75dfb945b203ac42a0ef Preparing metadata (setup.py) ... done Requirement already satisfied: lazy_loader in c:\users\gabri\desktop\comfyui_windows_portable\python_embeded\lib\site-packages (from kiui==0.2.9) (0.4) Requirement already satisfied: varname in c:\users\gabri\desktop\comfyui_windows_portable\python_embeded\lib\site-packages (from kiui==0.2.9) (0.13.1) Requirement already satisfied: objprint in c:\users\gabri\desktop\comfyui_windows_portable\python_embeded\lib\site-packages (from kiui==0.2.9) (0.2.3) Requirement already satisfied: packaging in c:\users\gabri\desktop\comfyui_windows_portable\python_embeded\lib\site-packages (from lazy_loader->kiui==0.2.9) (24.0) Requirement already satisfied: executing<3.0,>=2.0 in c:\users\gabri\desktop\comfyui_windows_portable\python_embeded\lib\site-packages (from varname->kiui==0.2.9) (2.0.1) PS C:\Users\gabri>

While this is the error i get when i launched the .bat

_Traceback (most recent call last): File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1879, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack__init.py", line 28, in module = importlib.import_module(f".{nodes_filename}", package=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib__init.py", line 126, in import_module File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 36, in from .algorithms.dmtet import DMTetMesh File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\dmtet.py", line 6, in from pytorch3d.loss import chamfer_distance, mesh_laplacian_smoothing File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pytorch3d\loss\init__.py", line 8, in from .chamfer import chamfer_distance File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pytorch3d\loss\chamfer.py", line 11, in from pytorch3d.ops.knn import knn_gather, knn_points File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pytorch3d\ops\init__.py", line 7, in from .ball_query import ball_query File "C:\Users\gabri\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pytorch3d\ops\ball_query.py", line 10, in from pytorch3d import _C ImportError: DLL load failed while importing _C: Impossibile trovare la procedura specificata.

Cannot import C:\Users\gabri\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: DLL load failed while importing _C: Impossibile trovare la procedura specificata. Adding C:\Users\gabri\Desktop\ComfyUI_windows_portable\ComfyUI\customnodes to sys.path Could not find efficiency nodes

I've also tried what suggested @maxious but i get always the message for each line

XXXXXX is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.

leonnn1 commented 2 weeks ago

I guess this repo is broken for many users, I tried for hours and hours to make it work, reinstalled everything from scratch, made new envs and it simply doesn't work

CoraAI commented 5 days ago

If you install this via comfyui-manager, you'll need to manually install the prebuilt wheels appropriate to your environment afterwards eg. for windows/python3.11/cuda 12.1

cd C:\ComfyUI_windows_portable\python_embeded\
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\diff_gaussian_rasterization-0.0.0-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\kiui-0.2.4-py3-none-any.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\nvdiffrast-0.3.1-py3-none-any.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\pointnet2_ops-3.0.0-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\pytorch3d-0.7.6-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\simple_knn-0.0.0-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\torch_scatter-2.1.2-cp311-cp311-win_amd64.whl
./python.exe -m pip install ..\ComfyUI\custom_nodes\ComfyUI-3D-Pack\_Pre_Builds\_Wheels_win_py311_cu121\torchmcubes-0.1.0-cp311-cp311-win_amd64.whl

this works for me, thanks!