geopavlakos / hamer

HaMeR: Reconstructing Hands in 3D with Transformers
https://geopavlakos.github.io/hamer/
MIT License
326 stars 28 forks source link

OSError when Running demo.py #7

Closed earth15354 closed 8 months ago

earth15354 commented 8 months ago

Hi, I followed the instructions on the readme and tried running the demo through the line given. However, when I do so, I get the following error:

OSError: libtorch_cuda_cpp.so: cannot open shared object file: No such file or directory

It might be because of my cuda version... the readme recommends 11.7, but my device is currently running on 11.3. Because of this, my pytorch version might be different from what is required? Is there a specification on the minimum pytorch version required to run the demo or do you have an intuition as to why this error is appearing?

For context, I think the import it is failing to perform is importing HAMER and from HAMER I think it is failing to import pytorch_lightning.

geopavlakos commented 8 months ago

Could you try a new installation and install pytorch by specifying cuda 11.3? Specifically, run: pip install torch torchvision --index-url https://download.pytorch.org/whl/cu113 instead of the line in the Readme.

We only tested the demo on cuda 11.7 and cuda 11.8, but it should work on earlier cuda versions too. Please let us know if this works for you.

earth15354 commented 8 months ago

Thanks for the previous response. I just tried running the above line after deleting pytorch and torchvision from my virtual environment, and I still ran into the same issue. Maybe there is a minimum cuda version that supports a version of pytorch that the code requires?

Also, heads up that I will be traveling for winter, so I won't have access to the laptop I'm trying to run this on for a while, so it might take a while for me to get back on the next few suggestions.

geopavlakos commented 8 months ago

Instead of uninstalling and re-installing pytorch, I would actually try to do the installation of the environment from scratch to make sure that there is no discrepancy in the different versions (e.g., between pytorch and pytorch_lightning, since you suspect the second to be the problem).

Closing this for now. Feel free to reopen it when you get the chance to get back on this.