Spaces:
Running
Running
admin
commited on
Commit
Β·
885bff2
1
Parent(s):
a78de1c
fix torch.load
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def generate_music(
|
|
102 |
vocab_size=128,
|
103 |
)
|
104 |
model = TunesFormer(patch_config, char_config, share_weights=SHARE_WEIGHTS)
|
105 |
-
checkpoint = torch.load(weights)
|
106 |
model.load_state_dict(checkpoint["model"])
|
107 |
model = model.to(DEVICE)
|
108 |
model.eval()
|
|
|
102 |
vocab_size=128,
|
103 |
)
|
104 |
model = TunesFormer(patch_config, char_config, share_weights=SHARE_WEIGHTS)
|
105 |
+
checkpoint = torch.load(weights, map_location=torch.device("cpu"))
|
106 |
model.load_state_dict(checkpoint["model"])
|
107 |
model = model.to(DEVICE)
|
108 |
model.eval()
|