ComfyUI-3D-Pack icon indicating copy to clipboard operation
ComfyUI-3D-Pack copied to clipboard

Manage to make it work for Google Colab !

Open lovisdotio opened this issue 1 year ago • 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 ;)

lovisdotio avatar Feb 07 '24 18:02 lovisdotio

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

MrForExample avatar Feb 09 '24 10:02 MrForExample

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

mothormothormothor avatar Feb 29 '24 11:02 mothormothormothor

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?

Kochi-SHOICHI avatar Mar 09 '24 17:03 Kochi-SHOICHI

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

lovisdotio avatar May 29 '24 21:05 lovisdotio