xingguang.zxg yingda.chen 3 years ago
parent
commit
e7c7be6aae
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/models/cv/text_driven_segmentation/lseg_model.py

+ 1
- 1
modelscope/models/cv/text_driven_segmentation/lseg_model.py View File

@@ -93,7 +93,7 @@ class TextDrivenSeg(TorchModel):
"""
with torch.no_grad():
if self.device_id == -1:
output = self.model(image)
output = self.model(image, [text])
else:
device = torch.device('cuda', self.device_id)
output = self.model(image.to(device), [text])


Loading…
Cancel
Save