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.16k stars 212 forks source link

ModuleNotFoundError: No module named 'torch_scatter' #229

Open robertvoy opened 1 month ago

robertvoy commented 1 month ago

I installed the pre builds manually. Everything seems to be there apart from torch_scatter, but there are no pre builds for that. What can I do? I tried building it myself, but ran into so many issues...

Traceback (most recent call last): File "C:\Users\Robert\Downloads\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1931, 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:\Users\Robert\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\__init__.py", line 47, in <module> module = importlib.import_module(f".{nodes_filename}", package=__name__) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib\__init__.py", line 126, in import_module 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:\Users\Robert\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 48, in <module> from FlexiCubes.flexicubes_trainer import FlexiCubesTrainer File "C:\Users\Robert\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\MVs_Algorithms\FlexiCubes\flexicubes_trainer.py", line 13, in <module> from .loss import sdf_reg_loss File "C:\Users\Robert\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\MVs_Algorithms\FlexiCubes\loss.py", line 9, in <module> import torch_scatter ModuleNotFoundError: No module named 'torch_scatter'

`Package Version


absl-py 2.1.0 accelerate 0.32.1 addict 2.4.0 aiohttp 3.9.5 aiosignal 1.3.1 albucore 0.0.12 albumentations 1.4.11 annotated-types 0.7.0 antlr4-python3-runtime 4.9.3 anyio 4.4.0 arrow 1.3.0 attrs 23.2.0 beautifulsoup4 4.12.3 binaryornot 0.4.4 certifi 2024.7.4 cffi 1.16.0 chardet 5.2.0 charset-normalizer 3.3.2 click 8.1.7 clip-interrogator 0.6.0 cmake 3.30.0 color-matcher 0.5.0 colorama 0.4.6 coloredlogs 15.0.1 colorlog 6.8.2 colour-science 0.4.4 contourpy 1.2.1 cookiecutter 2.6.0 cryptography 43.0.0 cssselect2 0.7.0 cycler 0.12.1 dataclasses-json 0.6.7 ddt 1.7.2 Deprecated 1.2.14 diff_gaussian_rasterization 0.0.0 diffusers 0.29.2 diskcache 5.6.3 distro 1.9.0 dnspython 2.6.1 docutils 0.21.2 easydict 1.13 einops 0.8.0 email_validator 2.2.0 eval_type_backport 0.2.0 executing 2.0.1 fastapi 0.111.1 fastapi-cli 0.0.4 filelock 3.15.4 fire 0.5.0 flatbuffers 24.3.25 flet 0.23.2 flet-core 0.23.2 flet-runtime 0.23.2 fonttools 4.53.1 frozenlist 1.4.1 fsspec 2024.6.1 ftfy 6.2.0 fvcore 0.1.5.post20221221 gdown 5.2.0 gitdb 4.0.11 GitPython 3.1.43 h11 0.14.0 httpcore 1.0.5 httptools 0.6.1 httpx 0.27.0 huggingface-hub 0.23.4 humanfriendly 10.0 idna 3.7 imageio 2.34.2 imageio-ffmpeg 0.5.1 importlib_metadata 8.0.0 intel-openmp 2021.4.0 iopath 0.1.10 jax 0.4.30 jaxlib 0.4.30 jaxtyping 0.2.33 Jinja2 3.1.4 joblib 1.4.2 jsonschema 4.23.0 jsonschema-specifications 2023.12.1 kiui 0.2.10 kiwisolver 1.4.5 kornia 0.7.3 kornia_rs 0.1.5 lark-parser 0.12.0 lazy_loader 0.4 lightning-utilities 0.11.5 llama_cpp_python 0.2.82 llvmlite 0.43.0 lxml 5.2.2 manifold3d 2.5.1 markdown-it-py 3.0.0 MarkupSafe 2.1.5 marshmallow 3.21.3 matplotlib 3.9.1 matrix-client 0.4.0 mdurl 0.1.2 mediapipe 0.10.14 mkl 2021.4.0 ml-dtypes 0.4.0 mpmath 1.3.0 msvc_runtime 14.40.33807 multidict 6.0.5 mypy-extensions 1.0.0 nerfacc 0.5.3 networkx 3.3 ninja 1.11.1.1 numba 0.60.0 numpy 1.26.4 nvdiffrast 0.3.1 oauthlib 3.2.2 objprint 0.2.3 omegaconf 2.3.0 onnxruntime 1.18.1 onnxruntime-gpu 1.18.1 open_clip_torch 2.26.1 openai 1.36.1 opencv-contrib-python 4.10.0.84 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 opt-einsum 3.3.0 packaging 23.2 pathlib 1.0.1 Pillow 9.5.0 pip 24.1.2 pixeloe 0.0.10 platformdirs 4.2.2 plyfile 1.0.3 pointnet2_ops 3.0.0 pooch 1.8.2 portalocker 2.10.1 protobuf 4.25.3 psutil 6.0.0 pycollada 0.8 pycparser 2.22 pydantic 2.8.2 pydantic_core 2.20.1 pydantic-settings 2.3.4 pygit2 1.15.1 PyGithub 2.3.0 pygltflib 1.16.2 Pygments 2.18.0 pyhocon 0.3.61 PyJWT 2.8.0 PyMatting 1.1.12 PyMCubes 0.1.6 pymeshlab 2023.12.post1 PyNaCl 1.5.0 pyOpenSSL 24.2.1 pyparsing 3.1.2 pypng 0.20220715.0 pyreadline3 3.4.1 PySocks 1.7.1 python-dateutil 2.9.0.post0 python-dotenv 1.0.1 python-multipart 0.0.9 python-slugify 8.0.4 pytorch-lightning 2.3.3 pytorch-msssim 1.0.0 pytorch3d 0.7.7 pywin32 306 PyYAML 6.0.1 qrcode 7.4.2 referencing 0.35.1 regex 2024.5.15 rembg 2.0.57 repath 0.9.0 reportlab 4.2.2 requests 2.32.3 requirements-parser 0.9.0 rich 13.7.1 rich-argparse 1.5.2 rpds-py 0.19.0 Rtree 1.3.0 safetensors 0.4.3 scikit-image 0.24.0 scikit-learn 1.5.1 scipy 1.14.0 segment-anything 1.0 sentencepiece 0.2.0 setuptools 70.3.0 shapely 2.0.5 shellingham 1.5.4 simple_knn 0.0.0 simple-lama-inpainting 0.1.2 six 1.16.0 smmap 5.0.1 sniffio 1.3.1 sounddevice 0.4.7 soundfile 0.12.1 soupsieve 2.5 spandrel 0.3.4 sse-starlette 2.1.2 starlette 0.37.2 starlette-context 0.3.6 svg.path 6.3 svglib 1.5.1 sympy 1.13.0 tabulate 0.9.0 tbb 2021.13.0 termcolor 2.4.0 text-unidecode 1.3 threadpoolctl 3.5.0 tifffile 2024.7.2 timm 1.0.7 tinycss2 1.3.0 tokenizers 0.19.1 tomli 2.0.1 torch 2.3.1+cu121 torchaudio 2.3.1+cu121 torchmetrics 1.4.0.post0 torchsde 0.2.6 torchtyping 0.1.4 torchvision 0.18.1+cu121 tqdm 4.66.4 trampoline 0.1.2 transformers 4.42.4 transparent-background 1.3.1 trimesh 4.4.3 typeguard 2.13.3 typer 0.12.3 types-python-dateutil 2.9.0.20240316 types-setuptools 70.3.0.20240710 typing_extensions 4.12.2 typing-inspect 0.9.0 urllib3 1.26.19 uvicorn 0.30.3 varname 0.13.3 vhacdx 0.0.8.post1 watchdog 4.0.1 watchfiles 0.22.0 wcwidth 0.2.13 webencodings 0.5.1 websockets 12.0 wget 3.2 wheel 0.43.0 wrapt 1.16.0 xatlas 0.0.9 xxhash 3.4.1 yacs 0.1.8 yapf 0.40.2 yarl 1.9.4 zipp 3.19.2`

MrForExample commented 1 month ago

@robertvoy Hi If you are installing the packages manually then to install torch_scatter you could simply run: pip install torch-scatter -f https://data.pyg.org/whl/torch-2.3.0+${CUDA}.html for pytorch version 2.3.0 Let me know if you have other problems 👍

NeoAnthropocene commented 1 month ago

@robertvoy In may case the below code worked to install the torch-scatter.

-m pip install torch-scatter -f https://data.pyg.org/whl/torch-2.3.0+cu121.html

Note that you should choose the necessary link from this list according to your system setup:

robertvoy commented 1 month ago

@robertvoy In may case the below code worked to install the torch-scatter.

-m pip install torch-scatter -f https://data.pyg.org/whl/torch-2.3.0+cu121.html

Note that you should choose the necessary link from this list according to your system setup:

Yes, this works if you have the build tools installed and comfyui install with a development python version. A lot of hoops you have to jump through to get this installed, gave up.