Spaces:
Running
Running
jiang
commited on
Commit
•
56bbba2
1
Parent(s):
08384c6
update
Browse files
demo.py
CHANGED
@@ -227,7 +227,7 @@ def visual_grounding(image, text):
|
|
227 |
sample = utils.move_to_cuda(sample) if use_cuda else sample
|
228 |
sample = utils.apply_to_sample(apply_half, sample) if use_fp16 else sample
|
229 |
|
230 |
-
with torch.
|
231 |
if isinstance(models, list):
|
232 |
model = models[0]
|
233 |
model = model.float()
|
|
|
227 |
sample = utils.move_to_cuda(sample) if use_cuda else sample
|
228 |
sample = utils.apply_to_sample(apply_half, sample) if use_fp16 else sample
|
229 |
|
230 |
+
with torch.no_grad():
|
231 |
if isinstance(models, list):
|
232 |
model = models[0]
|
233 |
model = model.float()
|