Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -195,7 +195,7 @@ def init_model():
|
|
| 195 |
else:
|
| 196 |
raise ValueError("xformers is not available. Make sure it is installed correctly")
|
| 197 |
ckpt_path = args.ckpt
|
| 198 |
-
state_dict =
|
| 199 |
model.load_state_dict(state_dict)
|
| 200 |
print('loading succeed')
|
| 201 |
model.eval() # important!
|
|
|
|
| 195 |
else:
|
| 196 |
raise ValueError("xformers is not available. Make sure it is installed correctly")
|
| 197 |
ckpt_path = args.ckpt
|
| 198 |
+
state_dict = state_dict = torch.load(ckpt_path, map_location=lambda storage, loc: storage)['ema']
|
| 199 |
model.load_state_dict(state_dict)
|
| 200 |
print('loading succeed')
|
| 201 |
model.eval() # important!
|