flamehaze1115 commited on
Commit
7f8cd5d
·
verified ·
1 Parent(s): 89ddc71

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +2 -2
gradio_app.py CHANGED
@@ -57,8 +57,8 @@ if not hasattr(Image, 'Resampling'):
57
 
58
 
59
  def sam_init():
60
- model = SamModel.from_pretrained("facebook/sam-vit-huge")
61
- processor = SamProcessor.from_pretrained("facebook/sam-vit-huge")
62
  return model, processor
63
 
64
  def sam_segment(sam_model, sam_processor, input_image, *bbox_coords):
 
57
 
58
 
59
  def sam_init():
60
+ model = SamModel.from_pretrained("facebook/sam-vit-huge").to(device=f"cuda:{_GPU_ID}")
61
+ processor = SamProcessor.from_pretrained("facebook/sam-vit-huge").to(device=f"cuda:{_GPU_ID}")
62
  return model, processor
63
 
64
  def sam_segment(sam_model, sam_processor, input_image, *bbox_coords):