Skip to content

Commit bc0b26a

Browse files
authored
Update modules.py
1 parent b3a32aa commit bc0b26a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

lib/modules.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,16 @@ def note_to_hz(note_name):
4848
except:
4949
return None
5050

51-
def load_hubert(hubert_model_path, config):
51+
def load_hubert(hubert_model_path):
5252
from fairseq import checkpoint_utils
5353

5454
models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
5555
[hubert_model_path],
5656
suffix="",
5757
)
5858
hubert_model = models[0]
59-
hubert_model = hubert_model.to(config.device)
60-
if config.is_half:
61-
hubert_model = hubert_model.half()
62-
else:
63-
hubert_model = hubert_model.float()
59+
#hubert_model = hubert_model.to(config.device)
60+
hubert_model = hubert_model.float()
6461

6562
hubert_models = hubert_model.eval()
6663
return hubert_models
@@ -292,8 +289,8 @@ def vc_single_dont_save(
292289
if self.hubert_model is None:
293290
self.hubert_model = load_hubert(hubert_model_path, self.config)
294291

295-
try:
296-
self.if_f0 = self.cpt.get("f0", 1)
292+
#try:
293+
# self.if_f0 = self.cpt.get("f0", 1)
297294
except NameError:
298295
message = "Model was not properly selected"
299296
print(message)

0 commit comments

Comments
 (0)