Spaces:
Sleeping
Sleeping
Commit
·
3012224
1
Parent(s):
07c1b75
Minor fix
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ elif hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
|
|
12 |
device = "mps"
|
13 |
|
14 |
model = FastSAM('./weights/FastSAM-x.pt')
|
15 |
-
model
|
16 |
|
17 |
def inference(image, conf_thres, iou_thres,):
|
18 |
pred = model(image, device=device, retina_masks=True, imgsz=1024, conf=conf_thres, iou=iou_thres)
|
|
|
12 |
device = "mps"
|
13 |
|
14 |
model = FastSAM('./weights/FastSAM-x.pt')
|
15 |
+
model.to(device)
|
16 |
|
17 |
def inference(image, conf_thres, iou_thres,):
|
18 |
pred = model(image, device=device, retina_masks=True, imgsz=1024, conf=conf_thres, iou=iou_thres)
|