ComfyUI-3D-Pack icon indicating copy to clipboard operation
ComfyUI-3D-Pack copied to clipboard

ModuleNotFoundError: No module named 'kiui'

Open WhiteKnight666 opened this issue 1 year ago • 16 comments

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'

WhiteKnight666 avatar May 19 '24 04:05 WhiteKnight666

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

MrForExample avatar May 21 '24 00:05 MrForExample

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.

Pupazzzz avatar May 22 '24 15:05 Pupazzzz

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'

renwerx avatar May 23 '24 22:05 renwerx

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

MrForExample avatar May 24 '24 16:05 MrForExample

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

maxious avatar May 26 '24 14:05 maxious

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.

Pupazzzz avatar May 27 '24 09:05 Pupazzzz

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

leonnn1 avatar Jun 19 '24 02:06 leonnn1

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!

CoraAI avatar Jun 28 '24 02:06 CoraAI

I have the same issue @Pupazzzz have. Installed wheels, and got the import procedure fail.

S-ed avatar Jul 03 '24 14:07 S-ed

./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

both of those pre builds are currently missing?

jasoa avatar Aug 03 '24 02:08 jasoa

@CoraAI \ComfyUI\custom_nodes\ComfyUI-3D-Pack_Pre_Builds_Wheels_win_py311_cu121 directory does not exist after installing ComfyUI-3D-Pack from comfyui manager. 3DPackDir No _Wheels_win_py311_cu121 directory. Can someone upload this directory somewhere?

I get error: ModuleNotFoundError: No module named 'kiui' after trying to install with comfyui manager(Windows)

pied-stuff avatar Aug 06 '24 21:08 pied-stuff

@CoraAI \ComfyUI\custom_nodes\ComfyUI-3D-Pack_Pre_Builds_Wheels_win_py311_cu121 directory does not exist after installing ComfyUI-3D-Pack from comfyui manager. 3DPackDir No _Wheels_win_py311_cu121 directory. Can someone upload this directory somewhere?

I get error: ModuleNotFoundError: No module named 'kiui' after trying to install with comfyui manager(Windows)

I often install nodes directly using terminal instead of comfy manager, not all nodes can be properly managed by manager ;) things like "ModuleNotFoundError: No module named 'kiui'", you can try install it in your comfy environment folder: In your comfy's environment folder (folder name should be python embeded), find ...\Lib\site-packages, right-click mouse, find option" open in terminal" and open it, type"pip install kiui", wait till the installation done. Restart comfyUI and it should work.

CoraAI avatar Aug 07 '24 02:08 CoraAI

Having this same issue. I tried CoraAI's suggestion above:

I often install nodes directly using terminal instead of comfy manager, not all nodes can be properly managed by manager ;) things like "ModuleNotFoundError: No module named 'kiui'", you can try install it in your comfy environment folder: In your comfy's environment folder (folder name should be python embeded), find ...\Lib\site-packages, right-click mouse, find option" open in terminal" and open it, type"pip install kiui", wait till the installation done. Restart comfyUI and it should work.

And still not having any luck. I get an import error in ComfyUI about kiui.

jessekirbs avatar Feb 11 '25 19:02 jessekirbs

Having this same issue. I tried CoraAI's suggestion above:

I often install nodes directly using terminal instead of comfy manager, not all nodes can be properly managed by manager ;) things like "ModuleNotFoundError: No module named 'kiui'", you can try install it in your comfy environment folder: In your comfy's environment folder (folder name should be python embeded), find ...\Lib\site-packages, right-click mouse, find option" open in terminal" and open it, type"pip install kiui", wait till the installation done. Restart comfyUI and it should work.

And still not having any luck. I get an import error in ComfyUI about kiui.

Are you using custom env? I use anaconda to manage envs of several comfy packs, If so then try activate env in terminal before any moves, also check out the corresponding environment variables path, sometimes it can't be set properly and need to be modified manually, I must say that I'm not a programmer, if the issue exists still, you'd better post with error codes in order to get professional help here.

CoraAI avatar Feb 12 '25 02:02 CoraAI

Hey @CoraAI - I'm not using custom envs. Just wanted to add to the conversation as another person having this issue. I didn't mean to sound like I wasn't appreciative of your suggestion, just hoping to make it clear that people are still experiencing this problem.

jessekirbs avatar Feb 12 '25 06:02 jessekirbs

Is there a solution to the problem 3d pack does not work and I have an error ModuleNotFoundError: No module named 'kiui'

IgorS1331 avatar Mar 28 '25 13:03 IgorS1331