ComfyUI-3D-Pack
ComfyUI-3D-Pack copied to clipboard
Error while installing
I got this error during installation:
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pytorch3d Running setup.py clean for pytorch3d Building wheel for torch-scatter (setup.py) ... done Created wheel for torch-scatter: filename=torch_scatter-2.1.2-cp311-cp311-win_amd64.whl size=3106178 sha256=930e53c86f48547dd34af4098eadb89f7467e3dc770562cb8145fbaf0a593a61 Stored in directory: C:\Users\rafae\AppData\Local\Temp\pip-ephem-wheel-cache-hgjnvqf_\wheels\fa\26\ab\08e8b8230fe29a7c209f0f26e92b097146f076d2184f24598f Building wheel for simple-knn (setup.py) ... done Created wheel for simple-knn: filename=simple_knn-0.0.0-cp311-cp311-win_amd64.whl size=403491 sha256=af65de468c93dbec8595ccda36ecb05a1f14d6b82c42b3deecb2dbfc5a4f70eb Stored in directory: C:\Users\rafae\AppData\Local\Temp\pip-ephem-wheel-cache-hgjnvqf_\wheels\cb\f8\29\513f7a4dc0ff322452961b34dd416713467ce2bee930dfd229 Building wheel for kiui (setup.py) ... done Created wheel for kiui: filename=kiui-0.2.4-py3-none-any.whl size=1189924 sha256=e82a60d07d79f79a9e3ed8a26ef116c32831813fb55bb92975f288cef9a9dd12 Stored in directory: C:\Users\rafae\AppData\Local\Temp\pip-ephem-wheel-cache-hgjnvqf_\wheels\20\3c\17\e791a15a84c4c4e2281c95331ff68b27a12f93ce8aa4c0aaf9 Building wheel for pygltflib (setup.py) ... done Created wheel for pygltflib: filename=pygltflib-1.16.1-py3-none-any.whl size=27197 sha256=197a8b7eeeb7a496e9e8f6b94431aa52a261ec593186ca1c0795d9f8611f8eeb Stored in directory: c:\users\rafae\appdata\local\pip\cache\wheels\04\ff\8c\86754a2795e826568c0464a00ca03ca29a5468148bb0406d65 Successfully built diff-gaussian-rasterization nvdiffrast torch-scatter simple-knn kiui pygltflib Failed to build pytorch3d ERROR: Could not build wheels for pytorch3d, which is required to install pyproject.toml-based projects The system cannot find the path specified. Install Finished! Press any key to continue . . .
I haven't encountered this problem before. But a few things you could try:
- Install using Miniconda
- Install with ComfyUI's embed python env on Windows by using chocolatey
- Clear the cache and do a clean re-install ComfyUI and follow the Install Instruction Closely
I'll optimize the install process a bit this weekend, since this appears to be where many users have problems
I've had the same issue, likely resulting from missing dependencies. I was able to fix it under Linux (WSL Ubuntu) since binaries for pytorch3d were available (building didn't work there either). Any streamlining of the process would be much appreciated!
I have ComfyUI installed with venv enviroment and lots of extension, I install Miniconda and follow the process correctly the only problems was wen building pythorch3d is there a way to install pytorch3d binaries in windows; and I don't wants to install a fresh version of comfy, men I don't have much space and my ComfyUI work really stable.
I found a way to install pre-build binaries if you point me were to install it I do the process
I install everything from zero and I get the same error look like it related to the compiling process.
-
first with the install .bat get the same error
-
manually plan b: the same error Error at startup:: okresearch/pytorch3d.git@stable Collecting git+https://github.com/facebookresearch/pytorch3d.git@stable Cloning https://github.com/facebookresearch/pytorch3d.git (to revision stable) to c:\users\rafae\appdata\local\temp\pip-req-build-3pvc5rky Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/pytorch3d.git 'C:\Users\rafae\AppData\Local\Temp\pip-req-build-3pvc5rky' Running command git checkout -q 2f11ddc5ee7d6bd56f2fb6744a16776fab6536f7 Resolved https://github.com/facebookresearch/pytorch3d.git to commit 2f11ddc5ee7d6bd56f2fb6744a16776fab6536f7 Preparing metadata (setup.py) ... done Collecting fvcore (from pytorch3d==0.7.5) Using cached fvcore-0.1.5.post20221221-py3-none-any.whl Collecting iopath (from pytorch3d==0.7.5) Using cached iopath-0.1.10-py3-none-any.whl Requirement already satisfied: numpy in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages (from fvcore->pytorch3d==0.7.5) (1.26.3) Collecting yacs>=0.1.6 (from fvcore->pytorch3d==0.7.5) Using cached yacs-0.1.8-py3-none-any.whl (14 kB) Requirement already satisfied: pyyaml>=5.1 in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages (from fvcore->pytorch3d==0.7.5) (6.0.1) Requirement already satisfied: tqdm in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages (from fvcore->pytorch3d==0.7.5) (4.66.1) Collecting termcolor>=1.1 (from fvcore->pytorch3d==0.7.5) Using cached termcolor-2.4.0-py3-none-any.whl.metadata (6.1 kB) Requirement already satisfied: Pillow in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages (from fvcore->pytorch3d==0.7.5) (10.2.0) Collecting tabulate (from fvcore->pytorch3d==0.7.5) Using cached tabulate-0.9.0-py3-none-any.whl (35 kB) Requirement already satisfied: typing-extensions in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages (from iopath->pytorch3d==0.7.5) (4.8.0) Collecting portalocker (from iopath->pytorch3d==0.7.5) Using cached portalocker-2.8.2-py3-none-any.whl.metadata (8.5 kB) Collecting pywin32>=226 (from portalocker->iopath->pytorch3d==0.7.5) Using cached pywin32-306-cp311-cp311-win_amd64.whl (9.2 MB) Requirement already satisfied: colorama in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages (from tqdm->fvcore->pytorch3d==0.7.5) (0.4.6) Using cached termcolor-2.4.0-py3-none-any.whl (7.7 kB) Using cached portalocker-2.8.2-py3-none-any.whl (17 kB) Building wheels for collected packages: pytorch3d Building wheel for pytorch3d (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [2577 lines of output] C:\Users\rafae\AppData\Local\Temp\pip-req-build-3pvc5rky\setup.py:84: UserWarning: The environment variable
CUB_HOME
was not found. NVIDIA CUB is required for compilation and can be downloaded fromhttps://github.com/NVIDIA/cub/releases
. You can unpack it to a location of your choice and set the environment variableCUB_HOME
to the folder containing theCMakeListst.txt
file. warnings.warn( running bdist_wheel K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\utils\cpp_extension.py:500: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.'))
trying to match the argument list '(float, float, float)' C:\Users\rafae\AppData\Local\Temp\pip-req-build-3pvc5rky\pytorch3d\csrc\pulsar\include./math.h(127): error C2668: 'make_float3': ambiguous call to overloaded function C:\Users\rafae\AppData\Local\Temp\pip-req-build-3pvc5rky\pytorch3d\csrc\pulsar\include../global.h(70): note: could be 'float3 make_float3(const float &,const float &,const float &)' C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include\vector_functions.hpp(243): note: or 'float3 make_float3(float,float,float)' C:\Users\rafae\AppData\Local\Temp\pip-req-build-3pvc5rky\pytorch3d\csrc\pulsar\include./math.h(127): note: while trying to match the argument list '(float, float, float)' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output] Last error:: note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pytorch3d Running setup.py clean for pytorch3d Failed to build pytorch3d ERROR: Could not build wheels for pytorch3d, which is required to install pyproject.toml-based projects (K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI) PS K:\ComfyUI\ComfyUI_Ex> Requirement already satisfied: typing-extensions in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packagesRequirement already satisfied: typing-extensions in k:\comfyui\comfyui_ex\python_miniconda_env\comfyui\lib\site-packages
Here are screenshot of the error att beginning and end is too long and cant copy here ::
thanks for the effort friend, I'll try to make install steps as painless as possible next
I found a way to install pre-build binaries if you point me were to install it I do the process
I think it doesn't matter where you install the pytorch3d, since the command I used is just pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
inside my miniconda env
Here are screenshot of the error at beginning and end is too long and cant copy here :
I see, when install from zero, it seems you fail to build without ninja. And error in pip install -r requirement.txt
prevent you from install the rest of package.
I updated the install.bat, please give a try again.
Ok thanks MrForExample
New error ::
The first error Warning gone I added the folder to system path but the second error the red one still there
I had the same issue when I tried to get this running. Was able to figure it out:
First issue was I was using CUDA 11.8, had to install 12.1.
Then I manually did all the following:
Go to your Your ComfyUI root directory, for my example:
cd C:\Users\reall\Softwares\ComfyUI_windows_portable
conda create -p ./python_miniconda_env/ComfyUI python=3.11
conda will tell what command to use to activate the env
conda activate C:\Users\reall\Softwares\ComfyUI_windows_portable\python_miniconda_env\ComfyUI
This package also works with cu118
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
pip install -r ./ComfyUI/requirements.txt
Then go to ComfyUI-3D-Pack directory under the ComfyUI Root Directory\ComfyUI\custom_nodes for my example is:
cd C:\Users\reall\Softwares\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack
First make sure the Conda env: python_miniconda_env\ComfyUI is activated, then go to ComfyUI Root Directory\ComfyUI\custom_nodes\ComfyUI-3D-Pack and:
pip install -r requirements.txt
git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization pip install ./diff-gaussian-rasterization
pip install ./simple-knn
pip install -U xformers --index-url https://download.pytorch.org/whl/cu121
git clone --recursive https://github.com/NVlabs/nvdiffrast/` pip install ./nvdiffrast
Install pointnet2_ops
cd tgs/models/snowflake/pointnet2_ops_lib && python setup.py install && cd ../../../../
Install pytorch_scatter
pip install git+https://github.com/rusty1s/pytorch_scatter.git
Install pytorch3d
pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
Install kiuikit (Computer Vision Library)
pip install git+https://github.com/ashawkey/kiuikit.git
Then there was still a couple packages I was missing when i tried to run it. With the miniconda env still active i ran:
pip install --upgrade scipy
pip install matplotlib
pip install scikit-learn
then i was able to go back to the ComfyUI_windows_portable\ComfyUI dir and run:
python main.py --windows-standalone-build
and use the workflows.
Everything install without any problem the install miniconda.bat work well the only error in the part wen building pytorch wheel
Seems you can build all the other cuda packages but not pytorch3d, which means your VS build tools is setup correctly, I'm not really sure what happened in your env, sorry about that, you should check [pytorch3d INSTALL.md] (https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md)
I had the same issue when I tried to get this running. Was able to figure it out:
First issue was I was using CUDA 11.8, had to install 12.1.
Then I manually did all the following:
Go to your Your ComfyUI root directory, for my example:
cd C:\Users\reall\Softwares\ComfyUI_windows_portable
conda create -p ./python_miniconda_env/ComfyUI python=3.11
conda will tell what command to use to activate the env
conda activate C:\Users\reall\Softwares\ComfyUI_windows_portable\python_miniconda_env\ComfyUI
This package also works with cu118
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
pip install -r ./ComfyUI/requirements.txt
Then go to ComfyUI-3D-Pack directory under the ComfyUI Root Directory\ComfyUI\custom_nodes for my example is:
cd C:\Users\reall\Softwares\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack
First make sure the Conda env: python_miniconda_env\ComfyUI is activated, then go to ComfyUI Root Directory\ComfyUI\custom_nodes\ComfyUI-3D-Pack and:
pip install -r requirements.txt
git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization pip install ./diff-gaussian-rasterization
pip install ./simple-knn
pip install -U xformers --index-url https://download.pytorch.org/whl/cu121
git clone --recursive https://github.com/NVlabs/nvdiffrast/` pip install ./nvdiffrast
Install pointnet2_ops
cd tgs/models/snowflake/pointnet2_ops_lib && python setup.py install && cd ../../../../
Install pytorch_scatter
pip install git+https://github.com/rusty1s/pytorch_scatter.git
Install pytorch3d
pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
Install kiuikit (Computer Vision Library)
pip install git+https://github.com/ashawkey/kiuikit.git
Then there was still a couple packages I was missing when i tried to run it. With the miniconda env still active i ran:
pip install --upgrade scipy
pip install matplotlib
pip install scikit-learn
then i was able to go back to the ComfyUI_windows_portable\ComfyUI dir and run:
python main.py --windows-standalone-build
and use the workflows.
Hi friend, thanks for the effort, I updated the install methods yesterday, so now is pretty much the same for type all the pip command yourself and simply pip those two requirement.txt files. cheers :)
Thanks it works know
I had the same issue but managed to fix the issue by:
- Manually installing Conda.
- Redirecting the batch file " install_miniconda.bat" found in "ComfyUI\custom_nodes\ComfyUI-3D-Pack"
- Editing line - "python_miniconda_exec= " to the python.py file found in "\python_embeded\Lib\site-packages\torch_dispatch\python.py" (still gave me an error).
- opened comfyUI and it reinstalled the following: - torch-2.2.1-cp311-cp311-win_amd64.whl
This probably isn't the correct fix but seemed to work somehow. I wanted to post this here, just in case it helps other people.
python main.py --windows-standalone-build
I have a problem here, when I build.
I don't know why, I expended like 8 hours solving this... trying a lot of things X_x