Skip to content

Commit 3bc87e8

Browse files
committed
Update Install Methods & Instruction, LGM Workflow
1 parent 11ad9d6 commit 3bc87e8

File tree

9 files changed

+407
-357
lines changed

9 files changed

+407
-357
lines changed

README.md

Lines changed: 46 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
### Note: this project is still a WIP and not been released into ComFyUI package database yet
1313

1414
## Currently support:
15-
- For use case please check [Example Workflows](./_Example_Workflows/). [**Last update: 09/02/2024**]
15+
- For use case please check [Example Workflows](./_Example_Workflows/). [**Last update: 11/02/2024**]
1616
- **Note:** you need to put [Example Inputs Files & Folders](_Example_Workflows/_Example_Inputs_Files/) under ComfyUI Root Directory\ComfyUI\input folder before you can run the example workflow
1717

1818
- **Large Multiview Gaussian Model**: [3DTopia/LGM](https://github.com/3DTopia/LGM)
@@ -92,17 +92,20 @@
9292
## Install:
9393

9494
**[IMPORTANT!!!]** <br> Currently this package is only been tested in following setups:
95-
- Windows 10/11
96-
- Miniconda/Conda Python 3.11.7
95+
- Windows 10/11 (Tested on my laptop) & Ubuntu 23.10 [(Tested by @watsieboi)](https://github.com/MrForExample/ComfyUI-3D-Pack/issues/16)
96+
- Miniconda/Conda Python 3.11.x
9797
- I tried install this package with ComfyUI embed python env first, but I can't find a way to build CUDA related libraries, e.g. diff-gaussian-rasterization, nvdiffrast, simple-knn.
98-
- Torch version: 2.1.2+cu121/V.2.1.2+cu118
98+
- Torch version >= 2.1.2+cu121
9999

100100
<br>
101101

102102
Assume you have already downloaded [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
103103

104+
### Setup Method 0: Using Miniconda (Recommend! Should works in both Windows & Linux)
105+
104106
First download [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/) (*One of the best way to manage a clean and separated python envirments*)
105-
- Alternatively you can check this tutorial: [Installing ComfyUI with Miniconda On Windows and Mac](https://www.comflowy.com/preparation-for-study/install#step-two-download-comfyui)
107+
108+
Then running following commands to setup the Miniconda environment for ComfyUI:
106109

107110
```bash
108111
# Go to your Your ComfyUI root directory, for my example:
@@ -113,75 +116,63 @@ conda create -p ./python_miniconda_env/ComfyUI python=3.11
113116
# conda will tell what command to use to activate the env
114117
conda activate C:\Users\reall\Softwares\ComfyUI_windows_portable\python_miniconda_env\ComfyUI
115118

116-
# This package also works with cu118
119+
# update pip
120+
python -m pip install --upgrade pip
121+
122+
# You can using following command to installing CUDA only in the miniconda environment you just created if you don't want to donwload and install it manually & globally:
123+
# conda install -c "nvidia/label/cuda-12.1.0" cuda-toolkit
124+
125+
# Install the main packahes
117126
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
118127

119128
pip install -r ./ComfyUI/requirements.txt
120129

121130
# Then go to ComfyUI-3D-Pack directory under the ComfyUI Root Directory\ComfyUI\custom_nodes for my example is:
122131
cd C:\Users\reall\Softwares\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack
123-
# Finally you can double click following .bat script or run it in CLI:
124-
install.bat
125132
```
126133

127-
- ***Install Plan B:***
134+
- Alternatively you can check this tutorial: [Installing ComfyUI with Miniconda On Windows and Mac](https://www.comflowy.com/preparation-for-study/install#step-two-download-comfyui)
128135

129-
Just in case `install.bat` may not working in your PC, you could also run the following commands under this package's root directory:
136+
### Setup Method 1: Using Chocolatey (Windows Only!)
130137

131-
```bash
132-
# First make sure the Conda env: python_miniconda_env\ComfyUI is activated, then go to ComfyUI Root Directory\ComfyUI\custom_nodes\ComfyUI-3D-Pack and:
133-
pip install -r requirements.txt
134-
135-
git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization
136-
pip install ./diff-gaussian-rasterization
137-
138-
pip install ./simple-knn
139-
140-
pip install -U xformers --index-url https://download.pytorch.org/whl/cu121
138+
If you have already installed ComfyUI on Windows with embed python environment and you don't want to switch to Miniconda/Conda and reinstall all your packages <br>
139+
*(Which is ideal, but unfortunately so far it seems I'm not experienced enough in this matter, but I'll continue to looking for the better solutions and please give me some suggestions if you know better, thanks :)*
141140

142-
git clone --recursive https://github.com/NVlabs/nvdiffrast/`
143-
pip install ./nvdiffrast
141+
According to [@doctorpangloss](https://github.com/MrForExample/ComfyUI-3D-Pack/issues/5), you can setup the c++/cuda build environments in windows by using [chocolatey](https://chocolatey.org/) with following command:
144142

145-
# Install pointnet2_ops
146-
cd tgs/models/snowflake/pointnet2_ops_lib && python setup.py install && cd ../../../../
143+
```bash
144+
# using git bash for the sake of simplicity
145+
# enable developer mode
146+
# google this: allow os.symlink on windows by adding your username to the local security policy entry for it.
147+
# you will have to restart your computer
148+
# install chocolatey using powershell, then install the prereqs for compilation on Windows
149+
choco install -y visualstudio2022buildtools
150+
choco install -y visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.Component.VC.Llvm.Clang"
151+
# I couldn't find cuda version 12.1 in chocolatey package database, you may need to install cudav12.1 manually
152+
choco install -y cuda
153+
```
147154

148-
# Install pytorch_scatter
149-
pip install git+https://github.com/rusty1s/pytorch_scatter.git
155+
### Install Comfy3D:
156+
Go to the Comfy3D root directory: *ComfyUI Root Directory\ComfyUI\custom_nodes\ComfyUI-3D-Pack* and run:
150157

151-
# Install pytorch3d
152-
pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
158+
```bash
159+
install_miniconda.bat
160+
```
161+
Just in case `install_miniconda.bat` may not working in your OS, you could also run the following commands under the same directory: (Works with Linux & macOS)
153162

154-
# Install kiuikit (Computer Vision Library)
155-
pip install git+https://github.com/ashawkey/kiuikit.git
156-
```
163+
```bash
164+
pip install -r requirements.txt
157165

158-
- ***Install with ComfyUI's embed python env on Windows:***
166+
pip install -r requirements_post.txt
167+
```
168+
<br>
159169

160-
If you have already installed ComfyUI on Windows with embed python environment and you don't want to switch to Miniconda/Conda and reinstall all your packages <br>
161-
*(Which is ideal, but unfortunately so far it seems I'm not experienced enough in this matter, but I'll continue to looking for the better solutions and please give me some suggestions if ou know better, thanks :)*
162-
163-
According to [@doctorpangloss](https://github.com/MrForExample/ComfyUI-3D-Pack/issues/5), you can setup the c++/cuda build environments in windows by using [chocolatey](https://chocolatey.org/) with following command:
164-
```bash
165-
# using git bash for the sake of simplicity
166-
# enable developer mode
167-
# google this: allow os.symlink on windows by adding your username to the local security policy entry for it.
168-
# you will have to restart your computer
169-
# install chocolatey using powershell, then install the prereqs for compilation on Windows
170-
choco install -y visualstudio2022buildtools
171-
choco install -y visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.Component.VC.Llvm.Clang"
172-
# I couldn't find cuda version 12.1, you may need to install cudav12.1 manually
173-
choco install -y cuda
174-
```
175-
Then just go to ComfyUI-3D-Pack directory under the ComfyUI Root Directory\ComfyUI\custom_nodes and running:
176-
```bash
177-
pip install -r ./ComfyUI/requirements.txt
178-
179-
install.bat
180-
```
170+
**Plus:**<br>
171+
For those who want to run it inside Google Colab, you can check the [install instruction from @lovisdotio](https://github.com/MrForExample/ComfyUI-3D-Pack/issues/13)
181172

182173
## Run:
183174
Copy the files inside folder [__New_ComfyUI_Bats](./_New_ComfyUI_Bats/) to your ComfyUI root directory, and double click run_nvidia_gpu_miniconda.bat to start ComfyUI!
184-
- Alternatively you can just activate the Conda env: python_miniconda_env\ComfyUI, and go to your ComfyUI root directory then run command `python ./ComfyUI/main.py`
175+
- Alternatively you can just activate the Conda env: `python_miniconda_env\ComfyUI`, and go to your ComfyUI root directory then run command `python ./ComfyUI/main.py`
185176

186177
## Tips
187178
* The world & camera coordinate system is the same as OpenGL:
@@ -202,3 +193,4 @@ azimuth: in (-180, 180), from +z to +x is (0, 90)
202193
```
203194

204195
* If you encounter OpenGL errors (e.g., `[F glutil.cpp:338] eglInitialize() failed`), then set `force_cuda_rasterize` to true on corresponding node
196+
* If after the installation, your ComfyUI get stucked at starting or running, you could following the instruction in following link to solve the problem: [Code Hangs Indefinitely When Evaluating Neuron Models on GPU](https://github.com/lava-nc/lava-dl/discussions/211)

0 commit comments

Comments
 (0)