Skip to content

Conversation

@QuantuMope
Copy link

@QuantuMope QuantuMope commented Apr 16, 2025

Starting from torch 2.6.0, some APIs have changed:

  1. .type() --> .scalar_type()
  2. .type().is_cuda() --> .device().is_cuda()

This breaks the current build process.

This PR checks the user's torch version and uses the appropriate API.

I've confirmed that this works building on both torch 2.5 and 2.6 with cuda 12.4.

Issue detailing the error:
IDEA-Research/Grounded-SAM-2#78

@prusswan
Copy link

prusswan commented Apr 28, 2025

This should fix both #405 and #402:
#402 (comment)

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

Successfully merging this pull request may close these issues.

2 participants