Skip to content

Commit a25f3c0

Browse files
committed
Add instructions of installing dependencies using pip
* Enable to support Windows and venv. * Simplify the installation.
1 parent eeacb0b commit a25f3c0

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@
5252
```
5353

5454
2. Install the dependencies:
55-
55+
56+
There are two ways of installing dependencies.
57+
58+
1. Using a script (Linux & Conda only)
59+
5660
**Before running the following command there are somethings to note:**
5761
- By adding `--new-env`, a new conda environment named `trellis` will be created. If you want to use an existing conda environment, please remove this flag.
5862
- By default the `trellis` environment will use pytorch 2.4.0 with CUDA 11.8. If you want to use a different version of CUDA (e.g., if you have CUDA Toolkit 12.2 installed and do not want to install another 11.8 version for submodule compilation), you can remove the `--new-env` flag and manually install the required dependencies. Refer to [PyTorch](https://pytorch.org/get-started/previous-versions/) for the installation command.
@@ -83,6 +87,40 @@
8387
--demo Install all dependencies for demo
8488
```
8589

90+
2. Using pip (Windows & venv):
91+
92+
**Note:** Preinstall Python 3.10 and CUDA SDK 12.4. These versions are crucial. Other combinations may cause issues and will be discussed later.
93+
94+
Steps:
95+
96+
- **Create a virtual environment in the `Venv` directory:**
97+
```cmd
98+
python -m v Venv
99+
```
100+
101+
- **Activate the virtual environment:**
102+
103+
```cmd
104+
Venv\Scripts\activate
105+
```
106+
107+
- **Install package using pip:** This may take a while.
108+
```cmd
109+
pip install -r requirements.txt
110+
```
111+
112+
- **Install extra packages with dependencies on PyTorch:**
113+
```cmd
114+
pip install -r requirements_extra.txt
115+
```
116+
117+
**Known Issues**
118+
119+
1. For Python 3.11, there are issues when installing `diffoctreerast` and `diff-gaussian-rasterization`. The error reported is that the module `torch` couldn't be found.
120+
2. The package `spconv` does not support Python 3.12 (yet).
121+
122+
Additional work may be necessary to resolve these issues.
123+
86124
<!-- Pretrained Models -->
87125
## 🤖 Pretrained Models
88126

requirements.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
--extra-index-url https://download.pytorch.org/whl/cu124
2+
torch==2.5.1+cu124
3+
torchvision==0.20.1+cu124
4+
xformers==0.0.28.post3
5+
6+
pillow==10.2.0
7+
imageio==2.37.0
8+
imageio-ffmpeg==0.6.0
9+
tqdm==4.67.1
10+
easydict==1.13
11+
opencv-python-headless==4.11.0.86
12+
scipy==1.15.1
13+
ninja==1.11.1.3
14+
rembg==2.0.61
15+
onnxruntime==1.20.1
16+
trimesh==4.6.0
17+
xatlas==0.0.9
18+
pyvista==0.44.2
19+
pymeshfix==0.17.0
20+
igraph==0.11.8
21+
transformers==4.48.1
22+
23+
git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
24+
25+
https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl
26+
27+
--find-links https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html
28+
kaolin
29+
30+
git+https://github.com/NVlabs/nvdiffrast.git
31+
32+
spconv-cu120==2.3.6
33+
34+
gradio==4.44.1
35+
gradio_litmodel3d==0.0.1

requirements_extra.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
git+https://github.com/JeffreyXiang/diffoctreerast.git
2+
git+https://github.com/autonomousvision/mip-splatting.git#subdirectory=submodules/diff-gaussian-rasterization/

0 commit comments

Comments
 (0)