Spaces:
Running on Zero
Running on Zero
Commit ·
be1f3db
1
Parent(s): dc17e94
init SAM2 locally
Browse files
app.py
CHANGED
|
@@ -104,7 +104,6 @@ SAM2_CONFIG = "configs/sam2.1/sam2.1_hiera_l.yaml"
|
|
| 104 |
sam2_model = build_sam2(
|
| 105 |
config_file=SAM2_CONFIG,
|
| 106 |
ckpt_path=SAM2_CHECKPOINT,
|
| 107 |
-
device=torch.device("cpu"),
|
| 108 |
)
|
| 109 |
sam2_predictor = SAM2ImagePredictor(sam2_model)
|
| 110 |
# sam2_predictor = SAM2ImagePredictor.from_pretrained("facebook/sam2-hiera-large", device=torch.device("cpu"))
|
|
|
|
| 104 |
sam2_model = build_sam2(
|
| 105 |
config_file=SAM2_CONFIG,
|
| 106 |
ckpt_path=SAM2_CHECKPOINT,
|
|
|
|
| 107 |
)
|
| 108 |
sam2_predictor = SAM2ImagePredictor(sam2_model)
|
| 109 |
# sam2_predictor = SAM2ImagePredictor.from_pretrained("facebook/sam2-hiera-large", device=torch.device("cpu"))
|