wondervictor commited on
Commit
e8b794f
·
verified ·
1 Parent(s): 3f3e9ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -86,7 +86,8 @@ def initialize_models(sam_path, adapter_pth, model_cfg, cfg):
86
  global sam2_model, clip_model, mask_adapter
87
 
88
  if sam2_model is None:
89
- sam2_model = build_sam2(model_cfg, sam_path, device="cuda", apply_postprocessing=False)
 
90
  print("SAM2 model initialized.")
91
 
92
  if clip_model is None:
 
86
  global sam2_model, clip_model, mask_adapter
87
 
88
  if sam2_model is None:
89
+ sam2_model = build_sam2(model_cfg, sam_path, device="cpu", apply_postprocessing=False)
90
+ sam2_model = sam2_model.to("cuda")
91
  print("SAM2 model initialized.")
92
 
93
  if clip_model is None: