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.21k stars 221 forks source link

install script issue #278

Closed akagohary closed 1 month ago

akagohary commented 1 month ago

hello guys i've tried searching for a solution for my problem but i don't seem to find a fix

(venv) [gohary@MainPC ~]$ python /data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/install.py 
Traceback (most recent call last):
  File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/install.py", line 19, in <module>
    from build_utils import (
  File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Pre_Builds/_Build_Scripts/build_utils.py", line 50, in <module>
    CUDA_VERSION = get_cuda_version()
                   ^^^^^^^^^^^^^^^^^^
  File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Pre_Builds/_Build_Scripts/build_utils.py", line 40, in get_cuda_version
    result = subprocess.run(["nvcc", "--version"], text=True, capture_output=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nvcc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/install.py", line 83, in <module>
    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'?

running the fix through comfyui manager

FETCH DATA from: /data1/ComfyUI/custom_nodes/ComfyUI-Manager/.cache/1742899825_extension-node-map.json [DONE]
FETCH DATA from: /data1/ComfyUI/custom_nodes/ComfyUI-Manager/.cache/1514988643_custom-node-list.json [DONE]
FETCH DATA from: /data1/ComfyUI/custom_nodes/ComfyUI-Manager/.cache/746607195_github-stats.json [DONE]
Install custom node 'ComfyUI-3D-Pack'
Try fixing: ['https://github.com/MrForExample/ComfyUI-3D-Pack']
Install: pip packages

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'cmake']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'ninja']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'PyGithub']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'requests']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'numpy']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'einops']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'scipy']
  [ComfyUI-Manager] skip black listed pip installation: 'kornia'

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'opencv-python']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'pillow']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'nerfacc>=0.5.3']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'slangtorch']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'diffusers>=0.26.1']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'transformers>=4.36.2']
                 [ComfyUI-Manager] skip black listed pip installation: 'safetensors'

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'open_clip_torch']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'torchmetrics']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'pytorch_msssim']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'pytorch-lightning']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'rembg']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'imageio']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'imageio-ffmpeg']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'matplotlib']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'trimesh']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'plyfile']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'pygltflib']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'xatlas']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'pymeshlab']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'gpytoolbox']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'PyMCubes']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'torchtyping']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'tqdm']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'jaxtyping']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'packaging']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'OmegaConf']

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', '-m', 'pip', 'install', 'pyhocon']
  Install: install script

## ComfyUI-Manager: EXECUTE => ['/data1/ComfyUI/venv/bin/python', 'install.py']
[!] Traceback (most recent call last):
[!]   File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/install.py", line 19, in <module>
[!]     from build_utils import (
[!]   File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Pre_Builds/_Build_Scripts/build_utils.py", line 50, in <module>
[!]     CUDA_VERSION = get_cuda_version()
[!]                    ^^^^^^^^^^^^^^^^^^
[!]   File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Pre_Builds/_Build_Scripts/build_utils.py", line 40, in get_cuda_version
[!]     result = subprocess.run(["nvcc", "--version"], text=True, capture_output=True)
[!]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[!]   File "/usr/lib/python3.12/subprocess.py", line 548, in run
[!]     with Popen(*popenargs, **kwargs) as process:
[!]          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[!]   File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
[!]     self._execute_child(args, executable, preexec_fn, close_fds,
[!]   File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
[!]     raise child_exception_type(errno_num, err_msg, err_filename)
[!] FileNotFoundError: [Errno 2] No such file or directory: 'nvcc'
[!] 
[!] During handling of the above exception, another exception occurred:
[!] 
[!] Traceback (most recent call last):
[!]   File "/data1/ComfyUI/custom_nodes/ComfyUI-3D-Pack/install.py", line 83, in <module>
[!]     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'?
install script failed: https://github.com/MrForExample/ComfyUI-3D-Pack
Attempt to fixing '['https://github.com/MrForExample/ComfyUI-3D-Pack']' is done.

my nvcc -V

[gohary@MainPC ~]$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Jun__6_02:18:23_PDT_2024
Cuda compilation tools, release 12.5, V12.5.82
Build cuda_12.5.r12.5/compiler.34385749_0

my pip freeze

absl-py==2.1.0
accelerate==0.30.1
addict==2.4.0
aiohttp==3.9.5
aiosignal==1.3.1
albumentations==1.4.6
annotated-types==0.6.0
antlr4-python3-runtime==4.9.3
anyio==4.3.0
argostranslate==1.9.6
attrs==23.2.0
certifi==2024.2.2
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
clip-interrogator==0.6.0
cmake==3.29.2
color-matcher==0.5.0
colorama==0.4.6
coloredlogs==15.0.1
colorlog==6.8.2
contourpy==1.2.1
cryptography==42.0.7
cssselect2==0.7.0
cstr @ git+https://github.com/WASasquatch/cstr@0520c29a18a7a869a6e5983861d6f7a4c86f8e9b
ctranslate2==4.3.1
cycler==0.12.1
dataclasses-json==0.6.7
ddt==1.7.2
deepdiff==7.0.1
Deprecated==1.2.14
diffusers==0.29.2
diskcache==5.6.3
distro==1.9.0
dnspython==2.6.1
docutils==0.21.2
einops==0.7.0
email_validator==2.2.0
embreex==2.17.7.post4
emoji==2.12.1
fairscale==0.4.13
fastapi==0.111.1
fastapi-cli==0.0.4
ffmpy @ git+https://github.com/WASasquatch/ffmpy.git@f000737698b387ffaeab7cd871b0e9185811230d
filelock==3.14.0
fire==0.5.0
flatbuffers==24.3.25
fonttools==4.51.0
frozenlist==1.4.1
fsspec==2024.3.1
ftfy==6.2.0
fvcore==0.1.5.post20221221
gitdb==4.0.11
GitPython==3.1.43
gpytoolbox==0.3.2
h11==0.14.0
hatchling==1.25.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.1
imageio-ffmpeg==0.5.1
img2texture @ git+https://github.com/WASasquatch/img2texture.git@a546609a915caf1dcb84a15bf44b5b639ad924e6
importlib_metadata==7.1.0
iopath==0.1.10
jax==0.4.26
jaxlib==0.4.26
jaxtyping==0.2.31
Jinja2==3.1.4
joblib==1.4.2
json_repair==0.27.2
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
kiwisolver==1.4.5
kornia==0.7.2
kornia_rs==0.1.3
lark-parser==0.12.0
lazy_loader==0.4
lightning-utilities==0.11.2
llama_cpp_python==0.2.84
llvmlite==0.42.0
lxml==5.2.1
mapbox-earcut==1.0.1
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.21.3
matplotlib==3.8.4
matrix-client==0.4.0
mdurl==0.1.2
mediapipe==0.10.13
ml-dtypes==0.4.0
mpmath==1.3.0
multidict==6.0.5
mypy-extensions==1.0.0
nerfacc==0.5.3
networkx==3.3
ninja==1.11.1.1
numba==0.59.1
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.4.127
nvidia-nvtx-cu12==12.1.105
omegaconf==2.3.0
onnxruntime==1.17.3
onnxruntime-gpu==1.18.1
open-clip-torch==2.24.0
openai==1.37.1
opencv-contrib-python==4.9.0.80
opencv-python==4.9.0.80
opencv-python-headless==4.7.0.72
opt-einsum==3.3.0
ordered-set==4.1.0
packaging==24.0
pandas==2.2.2
pathspec==0.12.1
piexif==1.1.3
pilgram==1.2.1
Pillow==9.5.0
platformdirs==4.2.1
pluggy==1.5.0
plyfile==1.0.3
pooch==1.8.1
portalocker==2.8.2
protobuf==4.25.3
psutil==5.9.8
py-cpuinfo==9.0.0
pycollada==0.8
pycparser==2.22
pydantic==2.7.1
pydantic-settings==2.3.4
pydantic_core==2.18.2
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.4
pymeshlab==2023.12.post1
PyNaCl==1.5.0
pynvml==11.5.0
pyOpenSSL==24.2.1
pyparsing==3.1.2
PyQt5==5.15.10
PyQt5-Qt5==5.15.2
PyQt5-sip==12.13.0
pyrsmi==1.0.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.9
pytorch-lightning==2.2.5
pytorch-msssim==1.0.0
pytz==2024.1
PyWavelets==1.6.0
PyYAML==6.0.1
referencing==0.35.1
regex==2024.4.28
rembg==2.0.56
reportlab==4.2.0
requests==2.31.0
rich==13.7.1
roma==1.5.0
rpds-py==0.18.1
Rtree==1.2.0
sacremoses==0.0.53
safetensors==0.4.3
scikit-image==0.23.2
scikit-learn==1.4.2
scipy==1.13.0
seaborn==0.13.2
segment-anything==1.0
Send2Trash==1.8.3
sentencepiece==0.2.0
setuptools==69.5.1
shapely==2.0.4
shellingham==1.5.4
simple-lama-inpainting==0.1.2
six==1.16.0
slangtorch==1.2.3
smmap==5.0.1
sniffio==1.3.1
sounddevice==0.4.6
soundfile==0.12.1
spandrel==0.3.4
sse-starlette==2.1.2
stanza==1.1.1
starlette==0.37.2
starlette-context==0.3.6
svg.path==6.3
svglib==1.5.1
sympy==1.12
tabulate==0.9.0
termcolor==2.4.0
thop==0.1.1.post2209072238
threadpoolctl==3.5.0
tifffile==2024.5.3
timm==0.9.16
tinycss2==1.3.0
tokenizers==0.19.1
tomli==2.0.1
torch==2.4.0+cu121
torchaudio==2.4.0+cu121
torchmetrics==1.4.0.post0
torchsde==0.2.6
torchtyping==0.1.4
torchvision==0.19.0+cu121
tqdm==4.66.4
trampoline==0.1.2
transformers==4.40.2
trimesh==4.3.2
triton==3.0.0
trove-classifiers==2024.7.2
typeguard==2.13.3
typer==0.12.3
typing-inspect==0.9.0
typing_extensions==4.11.0
tzdata==2024.1
ultralytics==8.2.10
urllib3==1.26.18
uvicorn==0.30.3
uvloop==0.19.0
vhacdx==0.0.6
watchdog==4.0.1
watchfiles==0.22.0
wcwidth==0.2.13
webencodings==0.5.1
websockets==12.0
wrapt==1.16.0
xatlas==0.0.9
xformers==0.0.27.post2
xxhash==3.4.1
yacs==0.1.8
yapf==0.40.2
yarl==1.9.4
zipp==3.18.1

this is what i get when installation gets to install.py , both standlone and through comfyui manager

my system is archlinux

akagohary commented 1 month ago

i was wrong on so many levels, i had python 3.12 cuda 12.5 and pytorch 2.4 with no xformers

now to get xformers you need pytorch 2.3and cuda 12.1/11.8, i did the following to make it kinda work on Arch Linux

1 - i fully deleted my venv ( having python 3.12 was a no go and i don't think there is any clean way to downgrade "might be wrong on that ofc since am not python user" ) 2- i installed python311 form the AUR 2 - i needed to uninstall my latest cuda,cuda-tools,cudnn and install cuda 12.1 and its corresponding cuda-tools and cudnn of the same release age , that requires gcc12 and i had the latest gcc, so you need to install gcc12 from the AUR 3 - after compiling gcc12 "which took about 7 hours on my 6c12t machine" you need to install cuda manually through downloading them from archlinux archive and using sudo pacman -U cudaXX cudnnXXXX cuda-toolsXXX 4 - now you get to make a new venv in you existing comfyui folder with python version 3.11 , and then i started with pip install xformers==0.0.26.post1 and then installed comfyui requirments folder, that made my comfyui up again 5 - now i had all my plugins broken , but i started to fix them one by one through comfyui manager "running requirments scripts for every addon", but since now i was running python 3.11 it has a cap on what to update and if i run comfyui-3d pack installation again it would just revert what broke it back to earlier version

trying to build wheel for xformers to my pytorch 2.4wasn't working on my machine at all and i don't think it generaly works for such a components

now i did try to run comfy-3d-pack using instantmesh and other compination and am running out of cuda memory " i have 12gb vram and 64gb ram " i have no clue actually what is wrong but i though i'd write this before i forget, it has been tiring, i don't think am gonna continue this pursuit cause i'll have to maintain parallel components both on comfyui and my OS itself, untill the whole ecosystem is adapted to a reasonable cuda and pytorch ver i don't think its gonna be a welcoming tinkering environment

PS: you can't just update your system to have the latest stuff cause cuda will be overitten , there is a way to have parallel cuda's and making a certain version active at a time but i didn't really try it its here >>> https://github.com/mothguib/arch-cuda-parallel

@MrForExample thanks for the great work, keep it up =).