Spaces:
Runtime error
Runtime error
Merge branch 'master' into huggingface
Browse files- modules/constants.py +1 -0
- modules/sam_inference.py +1 -1
modules/constants.py
CHANGED
|
@@ -7,3 +7,4 @@ IMAGE_FILE_EXT = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp']
|
|
| 7 |
VIDEO_FILE_EXT = ['.mp4', '.avi', '.mov', '.wmv', '.flv', '.webm', '.mkv', '.mpeg', '.mpg', '.m4v', '.3gp', '.ts', '.vob']
|
| 8 |
DEFAULT_COLOR = "#00FF00"
|
| 9 |
DEFAULT_PIXEL_SIZE = 8
|
|
|
|
|
|
| 7 |
VIDEO_FILE_EXT = ['.mp4', '.avi', '.mov', '.wmv', '.flv', '.webm', '.mkv', '.mpeg', '.mpg', '.m4v', '.3gp', '.ts', '.vob']
|
| 8 |
DEFAULT_COLOR = "#00FF00"
|
| 9 |
DEFAULT_PIXEL_SIZE = 8
|
| 10 |
+
|
modules/sam_inference.py
CHANGED
|
@@ -41,7 +41,7 @@ class SamInference:
|
|
| 41 |
self.model_dir = model_dir
|
| 42 |
self.output_dir = output_dir
|
| 43 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 44 |
-
self.dtype = torch.float16 if torch.cuda.is_available() else torch.
|
| 45 |
self.mask_generator = None
|
| 46 |
self.image_predictor = None
|
| 47 |
self.video_predictor = None
|
|
|
|
| 41 |
self.model_dir = model_dir
|
| 42 |
self.output_dir = output_dir
|
| 43 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 44 |
+
self.dtype = torch.float16 if torch.cuda.is_available() else torch.bfloat16
|
| 45 |
self.mask_generator = None
|
| 46 |
self.image_predictor = None
|
| 47 |
self.video_predictor = None
|