MrForExample/ComfyUI-3D-Pack

Manage to make it work for Google Colab !

lovisdotio opened this issue · 4 comments

As it was unclear if it was working for Google Colab, I test it and I manage to install it for ComfyUi without anaconda or anything using this :

!pip install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
!git clone https://github.com/MrForExample/ComfyUI-3D-Pack.git
%cd ComfyUI-3D-Pack
!pip install -r requirements.txt
!git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization
!pip install ./diff-gaussian-rasterization
!pip install ./simple-knn

!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 ../../../../

!pip install git+https://github.com/rusty1s/pytorch_scatter.git
!pip install 'git+https://github.com/facebookresearch/detectron2.git'
import sys
import torch
pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
version_str="".join([
    f"py3{sys.version_info.minor}_cu",
    torch.version.cuda.replace(".",""),
    f"_pyt{pyt_version_str}"
])
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html

Its working perfectly on my side. Let me know ;)

Thanks for your effort my friend, I'll add that into install instructions soon, cheers :)

I'm kinda unsure on how to run this in Colab. Installation seems to work but I couldn't open the nodes in Comfy when running it in Colab. Can you provide a more detailed explanation on how to open in Colab? Would be awesome.
Cheers :)

When I run this in Google Colab, I get the following error:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'pytorch'
Could you please advise on how to fix this?