Spaces:
Sleeping
Sleeping
Update inference.py
Browse files- inference.py +0 -1
inference.py
CHANGED
|
@@ -6,7 +6,6 @@ from segment_anything import sam_model_registry
|
|
| 6 |
MEDSAM_IMG_INPUT_SIZE = 1024
|
| 7 |
|
| 8 |
def load_model(checkpoint_path):
|
| 9 |
-
# ← 不做 cuda 判断,不 .to("cuda")
|
| 10 |
model = sam_model_registry["vit_b"](checkpoint=checkpoint_path)
|
| 11 |
model = model.to("cpu")
|
| 12 |
model.eval()
|
|
|
|
| 6 |
MEDSAM_IMG_INPUT_SIZE = 1024
|
| 7 |
|
| 8 |
def load_model(checkpoint_path):
|
|
|
|
| 9 |
model = sam_model_registry["vit_b"](checkpoint=checkpoint_path)
|
| 10 |
model = model.to("cpu")
|
| 11 |
model.eval()
|