Spaces:
Runtime error
Runtime error
Commit
·
40bec0d
1
Parent(s):
9c259e8
half precision
Browse files
visual_foundation_models.py
CHANGED
|
@@ -107,7 +107,7 @@ def get_new_image_name(org_img_name, func_name="update"):
|
|
| 107 |
class MaskFormer:
|
| 108 |
def __init__(self, device):
|
| 109 |
self.device = device
|
| 110 |
-
self.processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 111 |
self.model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined", torch_dtype=torch.float16).to(device)
|
| 112 |
|
| 113 |
def inference(self, image_path, text):
|
|
|
|
| 107 |
class MaskFormer:
|
| 108 |
def __init__(self, device):
|
| 109 |
self.device = device
|
| 110 |
+
self.processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined", torch_dtype=torch.float16)
|
| 111 |
self.model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined", torch_dtype=torch.float16).to(device)
|
| 112 |
|
| 113 |
def inference(self, image_path, text):
|