Plachta commited on
Commit
9c466e3
1 Parent(s): 3a61e7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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():