Spaces:
Runtime error
Runtime error
krunakuamar
commited on
Commit
•
1718ab1
1
Parent(s):
4f42106
Update lama_cleaner/model/lama.py
Browse files- lama_cleaner/model/lama.py +10 -10
lama_cleaner/model/lama.py
CHANGED
@@ -19,16 +19,16 @@ class LaMa(InpaintModel):
|
|
19 |
pad_mod = 8
|
20 |
|
21 |
def init_model(self, device, **kwargs):
|
22 |
-
if os.environ.get("LAMA_MODEL"):
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
else:
|
29 |
-
|
30 |
-
# TODO used to create a lambda docker image
|
31 |
-
|
32 |
logger.info(f"Load LaMa model from: {model_path}")
|
33 |
model = torch.jit.load(model_path, map_location="cpu")
|
34 |
model = model.to(device)
|
|
|
19 |
pad_mod = 8
|
20 |
|
21 |
def init_model(self, device, **kwargs):
|
22 |
+
# if os.environ.get("LAMA_MODEL"):
|
23 |
+
# model_path = os.environ.get("LAMA_MODEL")
|
24 |
+
# if not os.path.exists(model_path):
|
25 |
+
# raise FileNotFoundError(
|
26 |
+
# f"lama torchscript model not found: {model_path}"
|
27 |
+
# )
|
28 |
+
# else:
|
29 |
+
# # model_path = download_model(LAMA_MODEL_URL)
|
30 |
+
# # TODO used to create a lambda docker image
|
31 |
+
model_path = 'app/big-lama.pt'
|
32 |
logger.info(f"Load LaMa model from: {model_path}")
|
33 |
model = torch.jit.load(model_path, map_location="cpu")
|
34 |
model = model.to(device)
|