Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation from ComfyUI manager dosn't work #140

Open
UnicornJoe42 opened this issue Apr 20, 2024 · 23 comments
Open

Installation from ComfyUI manager dosn't work #140

UnicornJoe42 opened this issue Apr 20, 2024 · 23 comments

Comments

@UnicornJoe42
Copy link

789780-98-90

@LichAcademy
Copy link

Hi Joe,

I have spent all day yesterday trying to install this thing. I'm not a programmer, so I nearly went nuts. Around the same time you posted this, I finally managed to get it to work. I was just about to post an issue, when I saw your message, so I will post it here for anyone else having the same issue.

I use Anaconda and Windows OS. Basically, what I managed to piece together is that this doesn't work on Python 3.12 or Python 3.10. You need Python 3.11. Not because of this repo, but because of all the dependencies and the dependencies' dependencies.

Using Anaconda, you set up the environment and install Python:

conda create --name py311
conda activate py311
conda install python=3.11.9

Get CUDA Toolkit v12.1 (this line of code is commented out in this repo, very easy to miss):

conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit

Get xformers for CUDA 12.1 (this is adapted from miniconda batch file):

python -s -m pip install --force-reinstall xformers --index-url https://download.pytorch.org/whl/cu121

Get torch for CUDA 12.1:

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121

That was the hardest part. Assuming all this well, the rest basically comes down to running pip install -r for each of the requirements.txt files.

Starting with the main repo:

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt

ComfyUI-Manager:

git clone https://github.com/ltdrdata/ComfyUI-Manager custom_nodes
pip install -r custom_nodes/ComfyUI-Manager/requirements.txt

And lastly, the Comfy3D:

git clone https://github.com/MrForExample/ComfyUI-3D-Pack custom_nodes
pip install -r custom_nodes/ComfyUI-3D-Pack/requirements.txt
pip install -r custom_nodes/ComfyUI-3D-Pack/requirements_post.txt

Never, under any circumstances, are you to update all your dependencies. That is, apparently, the worst sin Python developer can make. Only update things through ComfyUI-Manager.

I hope this helps you and anyone else struggling with this. Good luck!

@YanWenKun
Copy link
Contributor

I guess many of you are having trouble installing requirements_post.txt.

Try my all-in-one package:

(For Windows)
https://github.com/YanWenKun/ComfyUI-Windows-Portable

(For Linux)
https://github.com/YanWenKun/ComfyUI-Docker

@UnicornJoe42
Copy link
Author

Unboxed8941
Thanks, but it failed on wheel compilation this time

@UnicornJoe42
Copy link
Author

UnicornJoe42 commented Apr 22, 2024

YanWenKun
Thanks! It works for CRM for 2 first stages and then i have error:

ImportError: DLL load failed while importing nvdiffrast_plugin: the specified module cannot be found.

@LichAcademy
Copy link

Unboxed8941 Thanks, but it failed on wheel compilation this time

I'm not surprised. I remember that error well, it was the biggest hurdle for me. Ultimately, I got past that point when I deleted my Python 3.12.3 environment and created a new environment with Python 3.11.9.

I guess it also depends on other factors like, how much VRAM you have, which OS, do you have the right version of CUDA, does your graphics card support it, is the PyTorch installed, is the PyTorch compiled with the same version of CUDA is, etc...

Basically, all the stars have to align for this to work.

Good luck!

@YanWenKun
Copy link
Contributor

YanWenKun commented Apr 24, 2024

YanWenKun Thanks! It works for CRM for 2 first stages and then i have error:

ImportError: DLL load failed while importing nvdiffrast_plugin: the specified module cannot be found.

Here's an easy (although not elegant) way to fix errors with nvdiffrast:

(Assume you're using Windows 11)

  1. Install Visual Studio (Community is fine), then select & install "Desktop development with C++" workload.
    This will provide VC++ compilers.

  2. Install CUDA Toolkit.
    This will provide a big set of CUDA tools and auto-config env vars for you.
    NOTE: just use latest version, no need to stick with 12.1.

  3. edit run_nvidia_gpu.bat , add this line before ComfyUI starts:

NOTE: Make sure you edited "EDIT_THIS_TO_PATH_TO_YOUR_"

set PATH=%PATH%;C:\EDIT_THIS_TO_PATH_TO_YOUR_\python_embeded\Scripts\

This will make sure Ninja (a compiler tool) works.

I tested the example CRM workflow on a clean install with a TITAN Xp:

crm

Hope this will have more details covered. Wish you good luck!

@UnicornJoe42
Copy link
Author

YanWenKun
I'm on windows 10.
I have VS and CUDA installed, but I still get the error:
ninja: build stopped: subcommand failed.

@YanWenKun
Copy link
Contributor

@UnicornJoe42 What's the detail of the subcommand?
The log may be very long so recommend wrap it with triple backticks:

```log
the
long
long
logs
```

@UnicornJoe42
Copy link
Author

UnicornJoe42 commented Apr 30, 2024

YanWenKun
Last error i have:

'''
Error occurred when executing [Comfy3D] Load Convolutional Reconstruction Model:

Error building extension 'nvdiffrast_plugin': [1/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output rasterize.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\rasterize.cu -o rasterize.cuda.o
FAILED: rasterize.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output rasterize.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\rasterize.cu -o rasterize.cuda.o
[2/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output antialias.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\antialias.cu -o antialias.cuda.o
FAILED: antialias.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output antialias.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\antialias.cu -o antialias.cuda.o
[3/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output RasterImpl.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\cudaraster\impl\RasterImpl.cu -o RasterImpl.cuda.o
FAILED: RasterImpl.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output RasterImpl.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\cudaraster\impl\RasterImpl.cu -o RasterImpl.cuda.o
[4/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output texture.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\texture.cu -o texture.cuda.o
FAILED: texture.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output texture.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\texture.cu -o texture.cuda.o
[5/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output interpolate.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\interpolate.cu -o interpolate.cuda.o
FAILED: interpolate.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output interpolate.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\TH -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 -DNVDR_TORCH -lineinfo -c C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\common\interpolate.cu -o interpolate.cuda.o
ninja: build stopped: subcommand failed.

File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1910, in load_CRM
crm_model = CRM(crm_conf).to(device)
^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 59, in init
self.renderer = Renderer(tet_grid_size=self.tet_grid_size, camera_angle_num=self.camera_angle_num,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\util\renderer.py", line 15, in init
self.glctx = dr.RasterizeCudaContext()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 118, in _get_plugin
torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1823, in _write_ninja_file_and_build_library
_run_ninja_build(
File "C:\3d\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
raise RuntimeError(message) from e

'''

@LichAcademy
Copy link

LichAcademy commented May 1, 2024

@UnicornJoe42
Joe, backtick key is below the ESC key on the keyboard. Unfortunately, backtick (`) and apostrophe (') are deceptively similar. It's located on the same key where ~ symbol is. 👍

Error occurred when executing [Comfy3D] Load Convolutional Reconstruction Model:

Error building extension 'nvdiffrast_plugin': [1/6] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc --generate-dependencies-with-compile --dependency-output rasterize.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -

@YanWenKun
Copy link
Contributor

@UnicornJoe42
I didn't find any clue in the log... Maybe try other workflows? Like TripoSR, which requires fewer dependencies, and is more likely to work.

@TCFrancis
Copy link

TCFrancis commented May 7, 2024

Hi Joe,

I have spent all day yesterday trying to install this thing. I'm not a programmer, so I nearly went nuts. Around the same time you posted this, I finally managed to get it to work. I was just about to post an issue, when I saw your message, so I will post it here for anyone else having the same issue.

I use Anaconda and Windows OS. Basically, what I managed to piece together is that this doesn't work on Python 3.12 or Python 3.10. You need Python 3.11. Not because of this repo, but because of all the dependencies and the dependencies' dependencies.

Using Anaconda, you set up the environment and install Python:

conda create --name py311
conda activate py311
conda install python=3.11.9

Get CUDA Toolkit v12.1 (this line of code is commented out in this repo, very easy to miss):

conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit

Get xformers for CUDA 12.1 (this is adapted from miniconda batch file):

python -s -m pip install --force-reinstall xformers --index-url https://download.pytorch.org/whl/cu121

Get torch for CUDA 12.1:

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121

That was the hardest part. Assuming all this well, the rest basically comes down to running pip install -r for each of the requirements.txt files.

Starting with the main repo:

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt

ComfyUI-Manager:

git clone https://github.com/ltdrdata/ComfyUI-Manager custom_nodes
pip install -r custom_nodes/ComfyUI-Manager/requirements.txt

And lastly, the Comfy3D:

git clone https://github.com/MrForExample/ComfyUI-3D-Pack custom_nodes
pip install -r custom_nodes/ComfyUI-3D-Pack/requirements.txt
pip install -r custom_nodes/ComfyUI-3D-Pack/requirements_post.txt

Never, under any circumstances, are you to update all your dependencies. That is, apparently, the worst sin Python developer can make. Only update things through ComfyUI-Manager.

I hope this helps you and anyone else struggling with this. Good luck!

Thank you! :)
After spending 2 days trying (the front page guide) this guide finally worked for me. This should be the default installation guide!

@rethink-studios
Copy link

@YanWenKun

Hello! I'm using your repo: https://github.com/YanWenKun/ComfyUI-Windows-Portable
Loads cleanly after I install both CUDA and Visual Studio, however I'm getting this error when executing [CRM_Img_to_Multi-views_to_CCMs_to_Mesh.json]:

Error occurred when executing [Comfy3D] Load Convolutional Reconstruction Model:

Ninja is required to load C++ extensions

File "D:\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1910, in load_CRM
crm_model = CRM(crm_conf).to(device)
^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 59, in init
self.renderer = Renderer(tet_grid_size=self.tet_grid_size, camera_angle_num=self.camera_angle_num,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\util\renderer.py", line 15, in init
self.glctx = dr.RasterizeCudaContext()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 118, in _get_plugin
torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1793, in _write_ninja_file_and_build_library
verify_ninja_availability()
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1842, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")


error log

[Comfy3D] [Load_CRM_MVDiffusion_Model] loaded model ckpt from D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints/crm\ccm-diffusion.pth
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [00:04<00:00, 11.02it/s]
Fatal error in launcher: Unable to create process using '"D:\a\ComfyUI-Windows-Portable\ComfyUI-Windows-Portable\python_embeded\python.exe" "D:\ComfyUI_Windows_portable\python_embeded\Scripts\ninja.exe" --version': The system cannot find the file specified.

!!! Exception during processing !!!
Traceback (most recent call last):
File "D:\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1910, in load_CRM
crm_model = CRM(crm_conf).to(device)
^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 59, in init
self.renderer = Renderer(tet_grid_size=self.tet_grid_size, camera_angle_num=self.camera_angle_num,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\util\renderer.py", line 15, in init
self.glctx = dr.RasterizeCudaContext()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\nvdiffrast\torch\ops.py", line 118, in _get_plugin
torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1793, in _write_ninja_file_and_build_library
verify_ninja_availability()
File "D:\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 1842, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions

Prompt executed in 41.87 seconds

image

I'm not a programmer, but it seems as though the script can not find python: the "a", as the beginning invalidates the path:

'"D:\a\ComfyUI-Windows-Portable\ComfyUI-Windows-Portable\python_embeded\python.exe" "D:\ComfyUI_Windows_portable\python_embeded\Scripts\ninja.exe" --version': The system cannot find the file specified.

Any idea how to fix?

@YanWenKun
Copy link
Contributor

YanWenKun commented May 19, 2024

@rethink-studios I guess something went wrong with PIP's Ninja, so I updated the package and replaced ninja.exe with its official one (sounds weird, but I tested it and it works).

If you don't want to download the whole package again, just download the Ninja binary, extract it to python_embeded/Scripts, and replace the ninja.exe.

@DuckersMcQuack
Copy link

I guess many of you are having trouble installing requirements_post.txt.

Try my all-in-one package:

(For Windows) https://github.com/YanWenKun/ComfyUI-Windows-Portable

(For Linux) https://github.com/YanWenKun/ComfyUI-Docker

How do i use the .sh files? As readme states "Run run_nvidia_gpu.bat to start ComfyUI.", but there was no such file in your fork/distro.

@YanWenKun
Copy link
Contributor

How do i use the .sh files? As readme states "Run run_nvidia_gpu.bat to start ComfyUI.", but there was no such file in your fork/distro.

https://github.com/YanWenKun/ComfyUI-Windows-Portable/releases

@DuckersMcQuack
Copy link

DuckersMcQuack commented May 27, 2024

How do i use the .sh files? As readme states "Run run_nvidia_gpu.bat to start ComfyUI.", but there was no such file in your fork/distro.

https://github.com/YanWenKun/ComfyUI-Windows-Portable/releases

Thanks mate :)

So, a few bumps on that road once extracted and launched.

[AnimateDiffEvo] - ERROR - No motion models found. Please download one and place in: ['C:\\Users\\Duckers\\Downloads\\ComfyUI_Windows_portable_cu121\\ComfyUI_Windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-AnimateDiff-Evolved\\models', 'C:\\Users\\Duckers\\Downloads\\ComfyUI_Windows_portable_cu121\\ComfyUI_Windows_portable\\ComfyUI\\models\\animatediff_models']

As well as this error:

image

Tested another workflow from 3d pack, and now got this.

chrome_t4s61sDEpw

@YanWenKun
Copy link
Contributor

[AnimateDiffEvo] - ERROR - No motion models found.

Just ignore this. It's not related to 3D-Pack.

For workflows:

Try TripoSR first, it's more likely to work.

For zero123plus:

Click "Manager" on the right side panel, then click "Update All" and then click "RESTART" when done updating.

@DuckersMcQuack
Copy link

[AnimateDiffEvo] - ERROR - No motion models found.

Just ignore this. It's not related to 3D-Pack.

For workflows:

Try TripoSR first, it's more likely to work.

For zero123plus:

Click "Manager" on the right side panel, then click "Update All" and then click "RESTART" when done updating.

Updated all now, and neither of these will open at all.

CRM MVDiffusion_to_InstantMesh.json
CRM_Img_to_Multi-views_to_CCMs_to_Mesh.json
Multi-View-Images_to_Instant-NGP_to_3DMesh.json
MVDream_to_Large_Multiview_Gaussian_Model_to_3DGS and_3DMesh.json
Render_Mesh_and_3DGS_Example.json
Triplane_Gaussian_Transformers_to_3DGS_and_3DMesh.json
TripoSR_to_Mesh.json
Using_Stack_Orbit_Camera_Poses_to_conditioning_StableZero123.json
Wonder3D_to_Large_Multiview_Gaussian_Model_to_3DGS and_3DMesh.json

These ones does load

[FlexiCubes] Multi-View Depth plus Optional Normal maps to 3D Mesh.json
Wonder3D_to_NeuS_to_Mesh.json
Zero123Plus_to_InstantMesh.json


Zero can successfully generate 3d models, but any other diffuser pipeline scheduler will crash, and not work again until you load the workflow json anew

But wonder3D errors out on generation

Error occurred when executing [Comfy3D] Load Diffusers Pipeline:

Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints\flamehaze1115/wonder3d-v1.0\image_encoder.

File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1303, in load_diffusers_pipe
pipe = diffusers_pipeline_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 819, in from_pretrained
loaded_sub_model = load_sub_model(
^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\diffusers\pipelines\pipeline_loading_utils.py", line 473, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\transformers\modeling_utils.py", line 3305, in from_pretrained
raise EnvironmentError(

I tested "model impactframes__if_3d_crm_playground__comfyworkflows.json" from a youtuber, it also works, albeit very low quality 3d models and low textures.

@YanWenKun
Copy link
Contributor

Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints\flamehaze1115/wonder3d-v1.0\image_encoder.

The 3D-Pack will try to download the models when needed. But errors may happen.

Just download the model from HF and put it in:
ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints\flamehaze1115\wonder3d-v1.0\image_encoder

The same goes with other "Model file not found" error. Just google the model/repo name and put them under ComfyUI-3D-Pack\checkpoints respectively.

@DuckersMcQuack
Copy link

Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory C:\Users\Duckers\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints\flamehaze1115/wonder3d-v1.0\image_encoder.

The 3D-Pack will try to download the models when needed. But errors may happen.

Just download the model from HF and put it in: ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints\flamehaze1115\wonder3d-v1.0\image_encoder

The same goes with other "Model file not found" error. Just google the model/repo name and put them under ComfyUI-3D-Pack\checkpoints respectively.

thanks :)

But what about the other workflows that won't load in at all?

And for wonder3d, now model complaints are gone, but i've faced this error before, but never managed to fix it, what does it mean by "keys"?

chrome_cXFDEoOepy

@YanWenKun
Copy link
Contributor

And for wonder3d

Check HF, download/clone the whole repo into
ComfyUI\custom_nodes\ComfyUI-3D-Pack\checkpoints\flamehaze1115\wonder3d-v1.0\

what about the other workflows that won't load in at all

Need console output to know what happened.
(AFAIK, most workflows will try to download models at first. If workflows won't load at all, it's more likely a download problem.)

@GeminiSquishGames
Copy link

GeminiSquishGames commented Jul 7, 2024

I have a similar problem but wondering if it's related to Stability Matrix and how it sets up my different packages/platforms. The only error that seems to be happening is this:

Traceback (most recent call last):
  File "D:\Graphics\stability matrix\Data\Packages\ComfyUI\nodes.py", line 1907, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\Graphics\stability matrix\Data\Packages\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 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\Graphics\stability matrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 36, in <module>
    from .mesh_processer.mesh import Mesh
  File "D:\Graphics\stability matrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI-3D-Pack\mesh_processer\mesh.py", line 8, in <module>
    from kiui.op import safe_normalize, dot
ModuleNotFoundError: No module named 'kiui'

Cannot import D:\Graphics\stability matrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI-3D-Pack module for custom nodes: No module named 'kiui'

I've tried both methods of install just to be sure. First method, I'm unsure because I don't think I had to since I have VS Studio 2022 and all of the C++ extentions and such for building CUDA things (pretty much everything windows C++ also), and the link just takes me to where you download VS 2022.

I did everything for the miniconda and made the environment, but pip install -r requirements_post.txt fails to install giving the error:

 C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\torch\utils\cpp_extension.py:384: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\lintp\AppData\Local\Temp\pip-req-build-q44xbrmb\setup.py", line 144, in <module>
          setup(
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
          dist.run_commands()
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\dist.py", line 976, in run_command
          super().run_command(command)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\command\bdist_wheel.py", line 373, in run
          self.run_command("build")
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\dist.py", line 976, in run_command
          super().run_command(command)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
          self.run_command(cmd_name)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\dist.py", line 976, in run_command
          super().run_command(command)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\command\build_ext.py", line 93, in run
          _build_ext.run(self)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run
          self.build_extensions()
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\torch\utils\cpp_extension.py", line 522, in build_extensions
          _check_cuda_version(compiler_name, compiler_version)
        File "C:\Users\lintp\miniconda3\envs\comfy\Lib\site-packages\torch\utils\cpp_extension.py", line 417, in _check_cuda_version
          raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
      RuntimeError:
      The detected CUDA version (11.8) mismatches the version that was used to compile
      PyTorch (12.1). Please make sure to use the same CUDA versions.

      [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 (pyproject.toml) ... done
  Created wheel for torch_scatter: filename=torch_scatter-2.1.2-cp311-cp311-win_amd64.whl size=337940 sha256=259e0fc24a6cf7db26f505f29a5a264c3329bc48f5e50047c67cb4a30033a5e6
  Stored in directory: C:\Users\lintp\AppData\Local\Temp\pip-ephem-wheel-cache-e0zx5mfr\wheels\fa\26\ab\08e8b8230fe29a7c209f0f26e92b097146f076d2184f24598f
  Building wheel for kiui (setup.py) ... done
  Created wheel for kiui: filename=kiui-0.2.10-py3-none-any.whl size=3088183 sha256=7d61c0b999fb8f63f963195e52b8353b84fd30f2df79c5599d9e41cf7e9c6334
  Stored in directory: C:\Users\lintp\AppData\Local\Temp\pip-ephem-wheel-cache-e0zx5mfr\wheels\20\3c\17\e791a15a84c4c4e2281c95331ff68b27a12f93ce8aa4c0aaf9
Successfully built nvdiffrast torch_scatter kiui
Failed to build pointnet2_ops simple_knn diff_gaussian_rasterization pytorch3d
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pointnet2_ops, simple_knn, diff_gaussian_rasterization, pytorch3d)
(comfy) PS D:\graphics\stability matrix\Data\Packages\ComfyUI\custom_nodes\ComfyUI-3D-Pack>

Will try the alternatives listed here at some point. It's just dumb since it's probably one or two small things that aren't downloading properly... sigh

I guess many of you are having trouble installing requirements_post.txt.

Try my all-in-one package:

(For Windows) https://github.com/YanWenKun/ComfyUI-Windows-Portable

(For Linux) https://github.com/YanWenKun/ComfyUI-Docker

That's cool but I have no need for all of these things and like to keep only what I need. I prefer sniper rifles to shotguns. If it was for a lot more than just the 3D-pack stuff maybe. In fact I probably should just figure out which single 3D workflow suits my needs and system and just manually get the custom nodes for that I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants