shap-e icon indicating copy to clipboard operation
shap-e copied to clipboard

text_to_3d_sample : ..\shap_e\models\stf\renderer.py:287: UserWarning: falling back on native PyTorch renderer, which does not support full gradients warnings.warn(

Open T-rvw opened this issue 2 years ago • 2 comments

How to avoid fallback on using native pytorch renderer?

"UserWarning: exception rendering with PyTorch3D: No module named 'pytorch3d'. " It seems that I must install pytorch3d extraly?

T-rvw avatar May 13 '23 15:05 T-rvw

Hey there, this code surely will help you.💯 Link to colab code: https://colab.research.google.com/drive/1dm1p1tj2sIaxToPn2bP31v3GquE0MdvE?usp=sharing run code to install Pytorch3D. import sys import torch pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ f"py3{sys.version_info.minor}_cu", torch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) !pip install fvcore iopath !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html

Best regards

Sadegh-Kalami avatar May 14 '23 08:05 Sadegh-Kalami

Thanks for your solution, @Sadegh-Kalami .

It seems that torch3d should match a specific cuda version. Maybe I should change my local machine's cuda version?

PS D:\shap-e> pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu118_pyt201/download.html
Defaulting to user installation because normal site-packages is not writeable
Looking in links: https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu118_pyt201/download.html
ERROR: Could not find a version that satisfies the requirement pytorch3d (from versions: none)
ERROR: No matching distribution found for pytorch3d

T-rvw avatar May 14 '23 11:05 T-rvw

https://www.youtube.com/watch?v=UFQ8xVUp4w8

YVS007 avatar May 16 '23 10:05 YVS007

Hey, @T-rvw as far as I know My solution is for a Linux system. Check this link: https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md#3-install-wheels-for-linux If you can, I recommend you to have Linux or Ubuntu 18.04 system for running codes because they provide you better and more accessible environment. Best wishes 💯

Sadegh-Kalami avatar May 16 '23 11:05 Sadegh-Kalami

Hi, @Sadegh-Kalami . I also find out that Linux can directly pip install torch3d package while Windows can't. Thanks for your solution. Looks good to me :)

T-rvw avatar May 16 '23 11:05 T-rvw