Spaces:
Build error
Build error
ChrisPreston
commited on
Commit
·
fc9a60a
1
Parent(s):
830fb4c
Update modules/nsf_hifigan/models.py
Browse files
modules/nsf_hifigan/models.py
CHANGED
@@ -25,7 +25,7 @@ def load_model(model_path, device='cuda'):
|
|
25 |
|
26 |
generator = Generator(h).to(device)
|
27 |
|
28 |
-
cp_dict = torch.load(model_path)
|
29 |
generator.load_state_dict(cp_dict['generator'])
|
30 |
generator.eval()
|
31 |
generator.remove_weight_norm()
|
|
|
25 |
|
26 |
generator = Generator(h).to(device)
|
27 |
|
28 |
+
cp_dict = torch.load(model_path, map_location=torch.device('cpu'))
|
29 |
generator.load_state_dict(cp_dict['generator'])
|
30 |
generator.eval()
|
31 |
generator.remove_weight_norm()
|