Shengxiao0709 commited on
Commit
a4fce5b
·
verified ·
1 Parent(s): 2421c22

Update inference.py

Browse files
Files changed (1) hide show
  1. 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()