Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ sam.infer = add_inference_method(sam)
|
|
32 |
pretrained_model_path = "./epoch_9_step_535390.pth"
|
33 |
|
34 |
if pretrained_model_path != "":
|
35 |
-
sd = torch.load(pretrained_model_path)
|
36 |
# strip prefix "module." from keys
|
37 |
new_sd = {}
|
38 |
for k, v in sd.items():
|
|
|
32 |
pretrained_model_path = "./epoch_9_step_535390.pth"
|
33 |
|
34 |
if pretrained_model_path != "":
|
35 |
+
sd = torch.load(pretrained_model_path, map_location='cpu')
|
36 |
# strip prefix "module." from keys
|
37 |
new_sd = {}
|
38 |
for k, v in sd.items():
|