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

No module named 'shared_utils'

Open pcomfycloud123 opened this issue 1 year ago • 3 comments

Hi MrForExample.

Finally was able to install without any errors after figuring out my Cuda/pytorch mismatch but ComfyUI fails to load with the following message: No module named 'shared_utils' although i can see the shared_utils folder and the files inside. Here is the complete message:

BTW: thanks for your help

C:\Work\AI\ComfyUI_windows_portable>.\python_miniconda_env\ComfyUI\python.exe -s ComfyUI\main.py --windows-standalone-build Total VRAM 6144 MB, total RAM 65460 MB xformers version: 0.0.24 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce GTX 1660 Ti : cudaMallocAsync VAE dtype: torch.float32 Using xformers cross attention Traceback (most recent call last): File "C:\Work\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1893, 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:\Work\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main_init.py", line 18, in module = importlib.import_module(f".{nodes_filename}", package=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Work\AI\ComfyUI_windows_portable\python_miniconda_env\ComfyUI\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 "C:\Work\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main\nodes.py", line 18, in from .mesh_processer.mesh import Mesh File "C:\Work\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main\mesh_processer\mesh.py", line 9, in from shared_utils.sh_utils import SH2RGB ModuleNotFoundError: No module named 'shared_utils'

Cannot import C:\Work\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main module for custom nodes: No module named 'shared_utils'

Import times for custom nodes: 0.4 seconds (IMPORT FAILED): C:\Work\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main

Starting server

To see the GUI go to: http://127.0.0.1:8188

pcomfycloud123 avatar Feb 19 '24 22:02 pcomfycloud123

Hi, I'm not sure where & how did you download this project, as there is no ComfyUI-3D-Pack-main_init.py in the project, maybe someone else is forked project and made a modification, please download this project using git clone or just download directly through the web and put it under your ComfyUI root directory\ComfyUI\custom_nodes\ComfyUI-3D-Pack, in my case this project is under C:\Users\reall\Softwares\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack

MrForExample avatar Feb 22 '24 10:02 MrForExample

I am also getting the same issue. I used install method 1, followed by running:

pip install -r requirements.txt

pip install -r requirements_post.txt

in ComfyUI\custom_nodes\ComfyUI-3D-Pack-main\

Here is the error message:

(C:\ComfyUI\python_miniconda_env\ComfyUI) C:\ComfyUI>python main.py
Total VRAM 24575 MB, total RAM 65457 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
VAE dtype: torch.bfloat16
Using pytorch cross attention

Traceback (most recent call last):
  File "C:\ComfyUI\nodes.py", line 1887, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main\__init__.py", line 18, in <module>
    module = importlib.import_module(f".{nodes_filename}", package=__name__)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ComfyUI\python_miniconda_env\ComfyUI\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main\nodes.py", line 20, in <module>
    from .mesh_processer.mesh import Mesh
  File "C:\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main\mesh_processer\mesh.py", line 11, in <module>
    from shared_utils.sh_utils import SH2RGB
ModuleNotFoundError: No module named 'shared_utils'

Cannot import C:\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main module for custom nodes: No module named 'shared_utils'

Import times for custom nodes:
   0.7 seconds (IMPORT FAILED): C:\ComfyUI\custom_nodes\ComfyUI-3D-Pack-main

megusta617 avatar Mar 09 '24 23:03 megusta617

same question

i download 3dpack from comfyui-manager

D:\ComfyUI_Build\python_embeded\python.exe D:\ComfyUI_Build\ComfyUI\custom_nodes\ComfyUI-3D-Pack\install.py Traceback (most recent call last): File "D:\ComfyUI_Build\ComfyUI\custom_nodes\ComfyUI-3D-Pack\install.py", line 28, in from shared_utils.log_utils import cstr ModuleNotFoundError: No module named 'shared_utils'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\ComfyUI_Build\ComfyUI\custom_nodes\ComfyUI-3D-Pack\install.py", line 83, in cstr("Comfy3D install failed: Dependency installation has failed. Please install manually: https://github.com/MrForExample/ComfyUI-3D-Pack/tree/main/_Pre_Builds/README.md.").error.print() ^^^^ NameError: name 'cstr' is not defined. Did you mean: 'str'?

Process finished with exit code 1

Un1ess avatar Jul 16 '24 11:07 Un1ess