Spaces:
Sleeping
Sleeping
Removed GPU dependency from main model code
Browse files
models/GroundingDINO/groundingdino.py
CHANGED
@@ -547,7 +547,7 @@ class GroundingDINO(nn.Module):
|
|
547 |
features_exemp, _ = self.backbone(exemp_imgs)
|
548 |
combined_features = self.combine_features(features_exemp)
|
549 |
new_exemplars = [
|
550 |
-
torch.tensor(exemp).unsqueeze(0).
|
551 |
]
|
552 |
|
553 |
# Get visual exemplar tokens.
|
|
|
547 |
features_exemp, _ = self.backbone(exemp_imgs)
|
548 |
combined_features = self.combine_features(features_exemp)
|
549 |
new_exemplars = [
|
550 |
+
torch.tensor(exemp).unsqueeze(0).to(samples.device) for exemp in new_exemplars
|
551 |
]
|
552 |
|
553 |
# Get visual exemplar tokens.
|