Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'kiui' #152

Open
WhiteKnight666 opened this issue May 19, 2024 · 7 comments
Open

ModuleNotFoundError: No module named 'kiui' #152

WhiteKnight666 opened this issue May 19, 2024 · 7 comments

Comments

@WhiteKnight666
Copy link

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
Copy link
Owner

MrForExample commented May 21, 2024

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
Copy link

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
Copy link

renwerx commented May 23, 2024

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
Copy link
Owner

MrForExample commented May 24, 2024

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
Copy link

maxious commented May 26, 2024

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
Copy link

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\custom_nodes 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
Copy link

leonnn1 commented Jun 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants