Skip to content
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

need setup.py adding pytorch3d by default installation #118

Open
james-joobs opened this issue Dec 7, 2023 · 2 comments
Open

need setup.py adding pytorch3d by default installation #118

james-joobs opened this issue Dec 7, 2023 · 2 comments

Comments

@james-joobs
Copy link

james-joobs commented Dec 7, 2023

I spent a week for setting up shap-e installation to use sample files Jupyter notebook.
Shap-e needs to install pytorch3d independently but always faces c++, cuda dependencies aren't capable.
Pytorch3d definitely needs to build mesh's representation after generate some objects and other artifacts like ply, mil, or obj etc.

I need to official manual version on installation including pytorch3d dependencies.

Thank you.

@Apotrox
Copy link

Apotrox commented Dec 22, 2023

If you're still looking for this, here's what to do.
Create a virtual enviroment for shap-e and it's dependencies (if you haven't already when trying to set it up initially). Download and install the version of pytorch corresponding to your cuda version. There is no pytorch for Cuda 12.3, i rolled back to 11.8 for that one. Uninstall the installed version of the venv if you have to. YOU. NEED. THE. CUDA. VERSION. Install wheel for python in that venv. Now clone the NVIDIA CUB repo (https://github.com/NVIDIA/cub), preferably somewhere where you won't accidentally delete it, and set this path as an System Enviroment Variable called "CUB_HOME". Reboot your pc. Follow the instructions at the bottom on https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md
(basically you just run the cmd pip install "git+https://github.com/facebookresearch/pytorch3d.git"). That should take care of everything, and install it just fine. To use it, install the jupyter extention, then run python -m jupyter notebook in the venv. That should open a browser window, navigate through .\Shap-E\shap_e\examples\ and pick the one mode you want to use (img->3d, text-> 3d, etc). Open the jupyter notebook and set the variables however you like. For debugging purposes, add print(device) to the second cell. If the output of that is "cuda" you're good. When everything's ready, click Run > Run all Cells at the top. Good luck!

@james-joobs
Copy link
Author

If you're still looking for this, here's what to do. Create a virtual enviroment for shap-e and it's dependencies (if you haven't already when trying to set it up initially). Download and install the version of pytorch corresponding to your cuda version. There is no pytorch for Cuda 12.3, i rolled back to 11.8 for that one. Uninstall the installed version of the venv if you have to. YOU. NEED. THE. CUDA. VERSION. Install wheel for python in that venv. Now clone the NVIDIA CUB repo (https://github.com/NVIDIA/cub), preferably somewhere where you won't accidentally delete it, and set this path as an System Enviroment Variable called "CUB_HOME". Reboot your pc. Follow the instructions at the bottom on https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md (basically you just run the cmd pip install "git+https://github.com/facebookresearch/pytorch3d.git"). That should take care of everything, and install it just fine. To use it, install the jupyter extention, then run python -m jupyter notebook in the venv. That should open a browser window, navigate through .\Shap-E\shap_e\examples\ and pick the one mode you want to use (img->3d, text-> 3d, etc). Open the jupyter notebook and set the variables however you like. For debugging purposes, add print(device) to the second cell. If the output of that is "cuda" you're good. When everything's ready, click Run > Run all Cells at the top. Good luck!

This solution that I've already tried several times before is too unreliable to depends on official pytorch3d's installation.
As well as Shap-e was written with conda-forge yaml file to config initially, pytorch3d is needed to be automatically to check dependencies and cuda version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants