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
1.72k stars 165 forks source link

pip install -r requirements_post.txt #75

Open zhanghen1234 opened 4 months ago

zhanghen1234 commented 4 months ago

Hi, friend,My computer is window system, AMD graphics card. there is an error in executing this line of code. pip install -r requirements_post.txt Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Processing e:\uitest\comfyui-master\comfyui-master\custom_nodes\comfyui-3d-pack\tgs\models\snowflake\pointnet2_ops_lib Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [15 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "E:\UITest\ComfyUI-master\ComfyUI-master\custom_nodes\ComfyUI-3D-Pack\tgs\models\snowflake\pointnet2_ops_li b\setup.py", line 20, in os.environ["TORCH_CUDA_ARCH_LIST"] = ".".join(map(str, torch.cuda.get_device_capability())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\UITest\ComfyUI-master\ComfyUI-master\python_miniconda_env\ComfyUI\Lib\site-packages\torch\cuda__init .py", line 439, in get_device_capability prop = get_device_properties(device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\UITest\ComfyUI-master\ComfyUI-master\python_miniconda_env\ComfyUI\Lib\site-packages\torch\cuda__init__ .py", line 453, in get_device_properties _lazy_init() # will define _get_device_properties ^^^^^^^^^^^^ File "E:\UITest\ComfyUI-master\ComfyUI-master\python_miniconda_env\ComfyUI\Lib\site-packages\torch\cuda\init__ .py", line 302, in _lazy_init torch._C._cuda_init() RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driv er from http://www.nvidia.com/Download/index.aspx [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

MrForExample commented 3 months ago

Hi friend, if you are using AMD graphics card then you should install pytorch ROCm version instead

Having said the cause of that error you got, I still have to say that there are so many CUDA packages are been used in this project, so I'm not confident that you can make it work with your AMD graphics card, hope the best luck to you 👍

josephrocca commented 3 months ago

I'm not sure if this is a related to the OP's issue, or if this is something that can be fixed on your end, but ComfyUI Manager doesn't work with ComfyUI-3D-Pack because it doesn't seem to install requirements_post.txt.

For reference, the minimal reproduction of this is:

# on local machine
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
cd ../

# start docker
docker run --name comfyui -p 8188:8188 -it --rm --gpus all -v $PWD:/workspace pytorch/pytorch:2.2.1-cuda12.1-cudnn8-devel bash
pip install -r requirements.txt
python main.py --listen 0.0.0.0

Then open a workflow that uses TripoSR, and open manager and click "install missing custom nodes". It installs requirements, but not requirements_post.

I tried redoing the whole process but this time I pip installed the requirements and requirements_post files manually, and then restarted the server, but that gave me this at server startup:

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

I tried apt installing the relevant packages for that, but that seems to mess with other dependencies that are required by ComfyUI.

Falkonar commented 3 months ago

I have try 2 days to solve this on windows. Today I've install debian and when try to install _post.txt Failed building wheel for pointnet2-ops Failed building wheel for simple-knn Failed building wheel for diff-gaussian-rasterization Failed building wheel for pytorch3d Failed building wheel for torch-scatter Failed building wheel for torchmcubes Successfully built nvdiffrast kiui fvcore iopath Failed to build pointnet2-ops simple-knn diff-gaussian-rasterization pytorch3d torch-scatter torchmcubes ERROR: Could not build wheels for pointnet2-ops, simple-knn, diff-gaussian-rasterization, pytorch3d, torch-scatter, torchmcubes, which is required to install pyproject.toml-based projects .... I feel depressed

josephrocca commented 3 months ago

The setup below works with this workflow - though I don't think this workflow actually uses ComfyUI-3D-Pack.

# on local machine
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
cd ../

# start docker
docker run --name comfyui -p 8188:8188 -it --rm --gpus all -v $PWD:/workspace pytorch/pytorch:2.2.1-cuda12.1-cudnn8-devel bash
apt-get update
apt-get install wget git libgl1 libglib2.0-0 -y
pip install -r requirements.txt
python main.py --listen 0.0.0.0
# then load the workflow file and then click "manager" and "install missing custom nodes", and then restart

Workflow file here: https://gist.github.com/josephrocca/fbcc98c9b3ba0cd37d38215b116b5141