rinong commited on
Commit
a85cdf5
1 Parent(s): 1408f30

Models now loaded on appropriate device

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ class ImageEditor(object):
69
  model_size, latent_size, n_mlp, channel_multiplier=channel_mult
70
  ).to(self.device)
71
 
72
- checkpoint = torch.load(model_paths[model])
73
 
74
  g_ema.load_state_dict(checkpoint['g_ema'])
75
 
 
69
  model_size, latent_size, n_mlp, channel_multiplier=channel_mult
70
  ).to(self.device)
71
 
72
+ checkpoint = torch.load(model_paths[model], map_location=self.device)
73
 
74
  g_ema.load_state_dict(checkpoint['g_ema'])
75