rliu commited on
Commit
2311211
1 Parent(s): 5bb59b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ _ARTICLE = 'See uses.md'
53
 
54
  def load_model_from_config(config, ckpt, device, verbose=False):
55
  print(f'Loading model from {ckpt}')
56
- pl_sd = torch.load(ckpt, map_location=device)
57
  if 'global_step' in pl_sd:
58
  print(f'Global Step: {pl_sd["global_step"]}')
59
  sd = pl_sd['state_dict']
 
53
 
54
  def load_model_from_config(config, ckpt, device, verbose=False):
55
  print(f'Loading model from {ckpt}')
56
+ pl_sd = torch.load(ckpt, map_location='cpu')
57
  if 'global_step' in pl_sd:
58
  print(f'Global Step: {pl_sd["global_step"]}')
59
  sd = pl_sd['state_dict']