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.28k stars 231 forks source link

Manage to make it work for Google Colab ! #13

Open lovisdotio opened 8 months ago

lovisdotio commented 8 months ago

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 ;)

MrForExample commented 8 months ago

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

mothormothormothor commented 7 months ago

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 :)

Kochi-SHOICHI commented 7 months ago

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?

lovisdotio commented 4 months ago

Ooook guys, good news !! I made a fully functionnal Google Colab here : https://colab.research.google.com/drive/1i9wTQhO8MkuXJjiUiIG4b0N4uITiJpX2?authuser=1#scrollTo=EXGAVghD0Wfu check my twitter : https://x.com/OdinLovis/status/1795934072520282263