Spaces:
Sleeping
Sleeping
Update SAM2/sam2/build_sam.py
Browse files- SAM2/sam2/build_sam.py +1 -1
SAM2/sam2/build_sam.py
CHANGED
|
@@ -43,7 +43,7 @@ def build_sam2(
|
|
| 43 |
def build_sam2_video_predictor(
|
| 44 |
config_file,
|
| 45 |
ckpt_path=None,
|
| 46 |
-
device="cuda",
|
| 47 |
mode="eval",
|
| 48 |
hydra_overrides_extra=[],
|
| 49 |
apply_postprocessing=True,
|
|
|
|
| 43 |
def build_sam2_video_predictor(
|
| 44 |
config_file,
|
| 45 |
ckpt_path=None,
|
| 46 |
+
device="cuda" if torch.cuda.is_available() else "cpu",
|
| 47 |
mode="eval",
|
| 48 |
hydra_overrides_extra=[],
|
| 49 |
apply_postprocessing=True,
|