Skip to content

Commit 01c12da

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

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

README.md

Lines changed: 41 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,42 @@
8387
--demo Install all dependencies for demo
8488
```
8589

90+
2. Using pip (Cross-platform & venv):
91+
92+
**Note:** Preinstall CUDA SDK 12.4 and Python 3.10, 3.11, or 3.12. 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+
```sh
98+
python -m v Venv
99+
```
100+
101+
- **Activate the virtual environment:**
102+
103+
On Windows,
104+
```cmd
105+
Venv\Scripts\activate
106+
```
107+
On non-Windows,
108+
```sh
109+
source ./Venv/Scripts/activate
110+
```
111+
112+
- **Install package using pip:** This may take a while.
113+
```sh
114+
pip install -r requirements.txt
115+
```
116+
117+
- **Install extra packages with dependencies on PyTorch:**
118+
```sh
119+
pip install -r requirements_extra.txt
120+
```
121+
122+
**Known Issues**
123+
124+
1. The ROCm platform is not supported. Additional work may be necessary to resolve these issues.
125+
86126
<!-- Pretrained Models -->
87127
## 🤖 Pretrained Models
88128

requirements.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
wheel==0.45.1
23+
24+
git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
25+
26+
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; sys_platform == 'win32' and python_version == '3.10'
27+
https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp311-cp311-win_amd64.whl; sys_platform == 'win32' and python_version == '3.11'
28+
https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp312-cp312-win_amd64.whl; sys_platform == 'win32' and python_version == '3.12'
29+
flash-attn; sys_platform != 'win32'
30+
31+
--find-links https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html
32+
kaolin
33+
34+
git+https://github.com/NVlabs/nvdiffrast.git
35+
36+
spconv-cu124==2.3.8
37+
38+
gradio==4.44.1
39+
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)