Skip to content

Instantly share code, notes, and snippets.

@patriciogonzalezvivo
Last active October 22, 2024 18:24
Show Gist options
  • Save patriciogonzalezvivo/79012983ccac5c9654998dc3e3f52904 to your computer and use it in GitHub Desktop.
Save patriciogonzalezvivo/79012983ccac5c9654998dc3e3f52904 to your computer and use it in GitHub Desktop.

How to setup a Conda/Pytorch enviroment for using ComfyUI's 3D-Pack

Spoiler allert the solution was to target CUDA 11.8 (PyTorch 2.2.0+)

  1. Make sure you have git, git-lfs, mesa and CUDA-11-8 installed at a OS level
sudo apt install git git-lfs cuda-11-8 mesa-utils mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev 
  1. Install conda

  2. Create a new conda enviroment with Python 3.10, CUDA 11.8 and PyToch 2.2.0

conda create -n comfy3D python=3.10
conda activate comfy3D
pip install -U pip
conda install cuda -c nvidia/label/cuda-11.8.0
conda install pytorch=2.2.0 torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda install pytorch3d -c pytorch3d
pip install kiui 
pip install git+https://github.com/NVlabs/nvdiffrast/
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.2.0+cu118.html 
  1. Install ComfyUI (if you haven't)
git clone [email protected]:comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
  1. Install 3D Pack
cd custom_nodes
git clone -v --recursive --progress -- https://github.com/MrForExample/ComfyUI-3D-Pack
cd ComfyUI-3D-Pack
pip install -r requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment