Spaces:
Running
on
L4
Running
on
L4
Update gradio_app.py
Browse files- 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):
|