Spaces:
Build error
Build error
tesalonikahtp commited on
Commit ·
8ee96ec
1
Parent(s): 588e92b
fix typo
Browse files
app/util/passport_photo_engine/segmenter_rmbg.py
CHANGED
|
@@ -7,7 +7,7 @@ class SegmenterRMBG:
|
|
| 7 |
def __init__(self, device=None, model_input_size=(1024,1024)):
|
| 8 |
self.device = torch.device(device) if device else torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 9 |
self.model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-1.4", trust_remote_code=True).to(self.device)
|
| 10 |
-
self.
|
| 11 |
self.model_input_size = list(model_input_size)
|
| 12 |
|
| 13 |
def _preprocess(self, img_np):
|
|
|
|
| 7 |
def __init__(self, device=None, model_input_size=(1024,1024)):
|
| 8 |
self.device = torch.device(device) if device else torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 9 |
self.model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-1.4", trust_remote_code=True).to(self.device)
|
| 10 |
+
self.model.eval()
|
| 11 |
self.model_input_size = list(model_input_size)
|
| 12 |
|
| 13 |
def _preprocess(self, img_np):
|