Spaces:
Runtime error
Runtime error
Models now loaded on appropriate device
Browse files
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 |
|