Spaces:
Running
on
Zero
Running
on
Zero
hold
Browse files
app.py
CHANGED
|
@@ -11,8 +11,8 @@ from PIL import Image, ImageDraw
|
|
| 11 |
import numpy as np
|
| 12 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
| 13 |
|
| 14 |
-
predictor = SAM2ImagePredictor.from_pretrained("facebook/sam2.1-hiera-large")
|
| 15 |
-
print(predictor)
|
| 16 |
# with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
|
| 17 |
# predictor.set_image(<your_image>)
|
| 18 |
# masks, _, _ = predictor.predict(<input_prompts>)
|
|
|
|
| 11 |
import numpy as np
|
| 12 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
| 13 |
|
| 14 |
+
# predictor = SAM2ImagePredictor.from_pretrained("facebook/sam2.1-hiera-large", device="cuda")
|
| 15 |
+
# print(predictor)
|
| 16 |
# with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
|
| 17 |
# predictor.set_image(<your_image>)
|
| 18 |
# masks, _, _ = predictor.predict(<input_prompts>)
|