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

Can never get it to work

Open PJR1987 opened this issue 1 year ago • 8 comments

I have been at the forefront of all things generative AI for over 2 years and this is the only thing I have ever struggled with. I even DOWNGRADED Torch to 2.3 to try and get it running, only for Comfy3D to force upgrade back to 2.4.

Nothing I have tried, and I have tried every issue ticket and every youtube video going. No matter what I do it always fails and always shows as failing in the node manager.

It also tells me absolutely nothing of use or help as to why it never works. I have even fresh installed a new PC which I think is now screwed because of all the things I've tried doing to get this working and I will need to format it again.

This is the latest error I have got, but not something I got any of the other 10 times I tried to get this running:

Traceback (most recent call last): File "C:\Users\PJ\Desktop\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1998, 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\PJ\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack_init.py", line 53, 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\PJ\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 57, in from TriplaneGaussian.triplane_gaussian_transformers import TGS File "C:\Users\PJ\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\TriplaneGaussian\triplane_gaussian_transformers.py", line 6, in from TriplaneGaussian.models.image_feature import ImageFeature File "C:\Users\PJ\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\TriplaneGaussian\models\image_feature.py", line 7, in from ..utils.ops import compute_distance_transform File "C:\Users\PJ\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\TriplaneGaussian\utils\ops.py", line 8, in from pytorch3d import io File "C:\Users\PJ\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pytorch3d\io_init.py", line 10, in from .obj_io import load_obj, load_objs_as_meshes, save_obj File "C:\Users\PJ\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pytorch3d\io\obj_io.py", line 19, in from iopath.common.file_io import PathManager ModuleNotFoundError: No module named 'iopath'

PJR1987 avatar Oct 01 '24 07:10 PJR1987

run pip install iopath in your comfyui python env

clyce avatar Oct 04 '24 09:10 clyce

pytorch3d have not been installed normallly.

There are 3 stage of 3D-Pack installation. 1.setup stage of install.py,we must process all the conflicts between the specified package and exsits env. you use now.As my experiences, xformers must be the highest level for it. 2.pytorch and cuda version,as my progress of installation,version 2.4 is necessary for the current version.So my suggestion is build an individual environment for 3D-Pack base on conda. 3.Visual Studio Tool and Windows KIT.include : x64 Version of mvcc,cl.exe path specified in the system env variables.The two tools are the basis to use ninja.By the progress of Ninja using,maybe you must handle the ninja installation problem or LONG PATH Setting. After the two tools been settled,you also need to place all the obj,lib,or .h file contain in the INCLUDE environment variables.Remember,the lib files needed must contained in the libpath variables.

According to route of 3 steps above,this package can be installed easier and easier.

JimWang151 avatar Oct 06 '24 13:10 JimWang151

@PJR1987 Hopefully you've gotten this working by now, but if not:

I was able to get this working again after a period of having it broken by using Chat GPT to analyze the error. (I am not a programmer, and this was the easiest way to get specific step by step instructions for my setup.) In my case I had more errors listed that you seem to have, and you may only need to update your local ComfyUI Python install to take care of the missing "iopath" module.

Start with your ComfyUI fully up to date.

Copy/paste the error into the Chat GPT text field and specify that you want it to search for instructions to fix the problem for the ComfyUI 3D Pack online. It should spit out instructions for how to install/uninstall/reinstall components for your local ComfyUI build, including the local "iopath" module.

If it says you have mismatched versions of pytorch and torchaudio, etc. you'll need correct the instructions to replace the version/address Chat GPT lists for pytorch with "pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121" (or whatever the appropriate version is for your machine).

Hope all is well.

tcarneyjohnson avatar Oct 06 '24 17:10 tcarneyjohnson

This looks impressive but is nigh impossible to get running. Two days on this led to 'almost' working for a while. But it does seem impossible to set it up. I also tried the chatGPT mentioned above and it sends me around in circles installing and uninstalling. Is there any clear guidance on how to get it working? According to the below this should be fine.

Checking system compatibility for MrForExample's ComfyUI-3D-Pack... [OK] Python version 3.11.5 is compatible. [OK] PyTorch version 2.4.0+cu121 is compatible. [OK] CUDA is available. GPU: NVIDIA GeForce RTX 4090 [OK] Package 'opencv-python' is installed. [OK] Package 'plyfile' is installed. [OK] Package 'nvdiffrast' is installed. [OK] Package 'simple-knn' is installed. [OK] Package 'trimesh' is installed. [OK] Package 'xformers' is installed. [OK] Visual Studio with C++ Build Tools is installed.

  • [INFO] Visual Studio Installation #1: C:\Program Files\Microsoft Visual Studio\2022\Community [OK] Visual C++ Build Tools are installed.

[SUCCESS] Your system is compatible with MrForExample's ComfyUI-3D-Pack.

11.0 seconds (IMPORT FAILED): C:\Users\aadam\ComfyUI_3D\custom_nodes\ComfyUI-3D-Pack

aradamson avatar Oct 07 '24 06:10 aradamson

That had a weird cut and paste in it...

(venv) PS C:\Users\aadam\ComfyUI_3D> python checker.py Checking system compatibility for MrForExample's ComfyUI-3D-Pack... [OK] Python version 3.11.5 is compatible. [OK] PyTorch version 2.4.0+cu121 is compatible. [OK] CUDA is available. GPU: NVIDIA GeForce RTX 4090 [OK] Package 'opencv-python' is installed. [OK] Package 'plyfile' is installed. [OK] Package 'nvdiffrast' is installed. [OK] Package 'simple-knn' is installed. [OK] Package 'trimesh' is installed. [OK] Package 'xformers' is installed. [OK] Visual Studio with C++ Build Tools is installed.

  • [INFO] Visual Studio Installation #1: C:\Program Files\Microsoft Visual Studio\2022\Community [OK] Visual C++ Build Tools are installed.

[SUCCESS] Your system is compatible with MrForExample's ComfyUI-3D-Pack.

aradamson avatar Oct 07 '24 06:10 aradamson

pytorch3d have not been installed normallly.

There are 3 stage of 3D-Pack installation. 1.setup stage of install.py,we must process all the conflicts between the specified package and exsits env. you use now.As my experiences, xformers must be the highest level for it. 2.pytorch and cuda version,as my progress of installation,version 2.4 is necessary for the current version.So my suggestion is build an individual environment for 3D-Pack base on conda. 3.Visual Studio Tool and Windows KIT.include : x64 Version of mvcc,cl.exe path specified in the system env variables.The two tools are the basis to use ninja.By the progress of Ninja using,maybe you must handle the ninja installation problem or LONG PATH Setting. After the two tools been settled,you also need to place all the obj,lib,or .h file contain in the INCLUDE environment variables.Remember,the lib files needed must contained in the libpath variables.

According to route of 3 steps above,this package can be installed easier and easier.

Thanks for trying to help but I still cannot get this to run at all, unlike 100% of everything else I have ever tried...

Still get iopath error when iopath is installed. Installing Comfy3D gives a nodes_audio.py error, what the hell has audio got to do with 3d?

PJR1987 avatar Oct 22 '24 20:10 PJR1987

Hi all, I just updated the pre-builds for Windows; Python 3.10, 3.11, 3.12; pytorch 2.5.0, torchvision 0.20.0, xformer 0.28.0 post2 Hope you had a good weekend :)

MrForExample avatar Oct 28 '24 00:10 MrForExample

Hi all, I just updated the pre-builds for Windows; Python 3.10, 3.11, 3.12; pytorch 2.5.0, torchvision 0.20.0, xformer 0.28.0 post2 Hope you had a good weekend :)

I appreaciate your work, I had spent another 6h or so before you made this post still failing to get it to work no matter what I tried.

Does it work regardless of what version of CUDA you have installed, or only for 12.1? I tried downgrading everything to the CUDA, Torch, etc. you specified and still couldn't get it working. Still numerous errors which gave no helpful information. I will try again on my laptop to see if I get a different result for any reason.

PJR1987 avatar Oct 29 '24 10:10 PJR1987

@PJR1987 try new version with wheels for cuda 12.8

DenisKochetov avatar Jun 13 '25 20:06 DenisKochetov