liuyizhang commited on
Commit
0d1ddf1
1 Parent(s): 18957c7

update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -237,7 +237,8 @@ groundingdino_model = load_model_hf(config_file, ckpt_repo_id, ckpt_filenmae)
237
 
238
  # initialize SAM
239
  logger.info(f"initialize SAM model...")
240
- sam_predictor = SamPredictor(build_sam(checkpoint=sam_checkpoint))
 
241
  sam_mask_generator = SamAutomaticMaskGenerator(sam_predictor)
242
 
243
  # initialize stable-diffusion-inpainting
 
237
 
238
  # initialize SAM
239
  logger.info(f"initialize SAM model...")
240
+ sam_model = build_sam(checkpoint=sam_checkpoint).to(device)
241
+ sam_predictor = SamPredictor(sam_model)
242
  sam_mask_generator = SamAutomaticMaskGenerator(sam_predictor)
243
 
244
  # initialize stable-diffusion-inpainting