Spaces:
Build error
Build error
ChrisPreston
commited on
Commit
·
7f923a0
1
Parent(s):
fc9a60a
Update modules/hubert/hubert_model.py
Browse files
modules/hubert/hubert_model.py
CHANGED
@@ -220,7 +220,7 @@ def hubert_soft(
|
|
220 |
"""
|
221 |
dev = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
222 |
hubert = HubertSoft()
|
223 |
-
checkpoint = torch.load(path, map_location=
|
224 |
consume_prefix_in_state_dict_if_present(checkpoint, "module.")
|
225 |
hubert.load_state_dict(checkpoint)
|
226 |
hubert.eval().to(dev)
|
|
|
220 |
"""
|
221 |
dev = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
222 |
hubert = HubertSoft()
|
223 |
+
checkpoint = torch.load(path, map_location="cpu")
|
224 |
consume_prefix_in_state_dict_if_present(checkpoint, "module.")
|
225 |
hubert.load_state_dict(checkpoint)
|
226 |
hubert.eval().to(dev)
|