You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In requirements-detail.txt, we provide detailed versions of all packages, which correspond to the environment of python3.10 + cuda12.2.
This project relies on several important PyPI packages, which may be difficult to install.
Installation of nvdiffrast
nvdiffrast will compile the corresponding torch plugin the first time it runs, which requires support from ninja and cudatoolkit.
Therefore, it is necessary to ensure that ninja and cudatoolkit are correctly installed and that the CUDA_HOME environment variable is properly configured.
Ninja can be directly installed with pip install ninja.
Then set the CUDA_HOME variable to the installation directory of cudatoolkit, such as /usr/local/cuda.
Finally, pip install nvdiffrast.
If you cannot install cudatoolkit on the computer (e.g., insufficient permissions), you can use my modified pre-compiled version of nvdiffrast to pre-compile on another computer that has cudatoolkit and a similar environment (same versions of python, torch, cuda) and then install the .whl.
Installation of onnxruntime-gpu
Note that installing both onnxruntime and onnxruntime-gpu may result in not running on the GPU but on the CPU, leading to extremely slow inference speed.
TLDR: For cuda11.x, pip install onnxruntime-gpu. For cuda12.x, pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/.
Furthermore, you can install onnxruntime based on tensorrt to further increase the inference speed.
Note: If you do not correctly installed onnxruntime based on tensorrt, it is recommended to remove TensorrtExecutionProvider from https://github.com/AiuniAI/Unique3D/blob/4e1174c3896fee992ffc780d0ea813500401fae9/scripts/load_onnx.py#L4.
For cuda12.x, you can quickly install onnxruntime with tensorrt using the following commands (note to change the path /root/miniconda3/lib/python3.10/site-packages to the corresponding path of your python, and change /root/.bashrc to the path of .bashrc under your user directory):