ikuinen99 commited on
Commit
1101c88
·
1 Parent(s): 7fa1272
Files changed (1) hide show
  1. grounding_model.py +1 -1
grounding_model.py CHANGED
@@ -64,7 +64,7 @@ class GroundingModule(nn.Module):
64
  print('==> Box grounding with "{}"...'.format(prompt))
65
  with torch.cuda.amp.autocast(enabled=True):
66
  boxes, logits, phrases = predict(self.grounding_model,
67
- image_tensor, prompt, box_threshold, text_threshold, device=self.device)
68
  print(phrases)
69
  # from PIL import Image, ImageDraw, ImageFont
70
  H, W = original_image.size[1], original_image.size[0]
 
64
  print('==> Box grounding with "{}"...'.format(prompt))
65
  with torch.cuda.amp.autocast(enabled=True):
66
  boxes, logits, phrases = predict(self.grounding_model,
67
+ image_tensor, prompt, box_threshold, text_threshold, device='cpu')
68
  print(phrases)
69
  # from PIL import Image, ImageDraw, ImageFont
70
  H, W = original_image.size[1], original_image.size[0]