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

Issue with setup.sh installation and dependency conflict between PyTorch versions #2

Open
apromisedland opened this issue Feb 18, 2025 · 1 comment

Comments

@apromisedland
Copy link

apromisedland commented Feb 18, 2025

I encountered an issue while trying to reproduce the project. When running the setup.sh script for one-click installation, it didn't complete successfully. I then tried running the installation commands one by one and found that the error occurs when executing the following command:
pip install torch==2.2.0 torchvision==0.17.0 xformers==0.0.24 --index-url https://download.pytorch.org/whl/cu122 --force-reinstall
In /VADAR/models/sam2/setup.py, line 24, there are requirements as below:
# Required dependencies REQUIRED_PACKAGES = [ "torch>=2.5.1", "torchvision>=0.20.1"
The issue seems to be a dependency conflict: sam 2 1.0 requires PyTorch version >= 2.5.1, but upgrading PyTorch to 2.5.1 causes an issue with xformers, which requires PyTorch 2.2.0 for the Unidepth model.

Could you please advise on how to resolve this version conflict and successfully install the dependencies?Thank you for your help!

@damianomarsili
Copy link
Owner

Hi thank you for raising the issue. We have tested VADAR with torch==2.2.0 torchvision==0.17.0 xformers==0.0.24 and despite the stated conflict with SAM2 there are no issues with setting up or executing.

From the line that threw the error, I believe the issue may be that you are installing torch/torchvision/xformers for the wrong cuda version. Can you run nvcc --version? If you don't see cuda_12.2 you should update the --index-url. For example, if you are running cuda_11.8 you should replace --index-url with: --index-url https://download.pytorch.org/whl/cu118

Hope that helps!

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