GroundingDINO
GroundingDINO copied to clipboard
Add torch2.6 support for ms_deform_attn_cuda
Starting from torch 2.6.0, some APIs have changed:
-
.type() --> .scalar_type() -
.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: https://github.com/IDEA-Research/Grounded-SAM-2/issues/78
This should fix both #405 and #402: https://github.com/IDEA-Research/GroundingDINO/issues/402#issuecomment-2771979687