Skip to content

Add instructions of installing dependencies using pip #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
```

2. Install the dependencies:


There are two ways of installing dependencies.

1. Using a script (Linux & Conda only)

**Before running the following command there are somethings to note:**
- 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.
- 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.
Expand Down Expand Up @@ -83,6 +87,42 @@
--demo Install all dependencies for demo
```

2. Using pip (Cross-platform & venv):

**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.

Steps:

- **Create a virtual environment in the `Venv` directory:**
```sh
python -m v Venv
```

- **Activate the virtual environment:**

On Windows,
```cmd
Venv\Scripts\activate
```
On non-Windows,
```sh
source ./Venv/Scripts/activate
```

- **Install package using pip:** This may take a while.
```sh
pip install -r requirements.txt
```

- **Install extra packages with dependencies on PyTorch:**
```sh
pip install -r requirements_extra.txt
```

**Known Issues**

1. The ROCm platform is not supported. Additional work may be necessary to resolve these issues.

<!-- Pretrained Models -->
## 🤖 Pretrained Models

Expand Down
39 changes: 39 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--extra-index-url https://download.pytorch.org/whl/cu124
torch==2.5.1+cu124
torchvision==0.20.1+cu124
xformers==0.0.28.post3

pillow==10.2.0
imageio==2.37.0
imageio-ffmpeg==0.6.0
tqdm==4.67.1
easydict==1.13
opencv-python-headless==4.11.0.86
scipy==1.15.1
ninja==1.11.1.3
rembg==2.0.61
onnxruntime==1.20.1
trimesh==4.6.0
xatlas==0.0.9
pyvista==0.44.2
pymeshfix==0.17.0
igraph==0.11.8
transformers==4.48.1
wheel==0.45.1

git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8

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'
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'
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'
flash-attn; sys_platform != 'win32'

--find-links https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html
kaolin

git+https://github.com/NVlabs/nvdiffrast.git

spconv-cu124==2.3.8

gradio==4.44.1
gradio_litmodel3d==0.0.1
2 changes: 2 additions & 0 deletions requirements_extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
git+https://github.com/JeffreyXiang/diffoctreerast.git
git+https://github.com/autonomousvision/mip-splatting.git#subdirectory=submodules/diff-gaussian-rasterization/