Commit
·
9307dcc
1
Parent(s):
47b2d6e
remove fairseq dependency
Browse files- app.py +11 -6
- requirements.txt +0 -1
app.py
CHANGED
@@ -224,7 +224,6 @@ from lib.infer_pack.models import (
|
|
224 |
SynthesizerTrnMs768NSFsid_nono,
|
225 |
)
|
226 |
import soundfile as sf
|
227 |
-
from fairseq import checkpoint_utils
|
228 |
import gradio as gr
|
229 |
import logging
|
230 |
from vc_infer_pipeline import VC
|
@@ -238,18 +237,24 @@ hubert_model = None
|
|
238 |
|
239 |
def load_hubert():
|
240 |
global hubert_model
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
hubert_model = models[0]
|
246 |
hubert_model = hubert_model.to(config.device)
|
247 |
if config.is_half:
|
248 |
hubert_model = hubert_model.half()
|
249 |
else:
|
250 |
hubert_model = hubert_model.float()
|
|
|
251 |
hubert_model.eval()
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
weight_root = "weights"
|
255 |
index_root = "logs"
|
|
|
224 |
SynthesizerTrnMs768NSFsid_nono,
|
225 |
)
|
226 |
import soundfile as sf
|
|
|
227 |
import gradio as gr
|
228 |
import logging
|
229 |
from vc_infer_pipeline import VC
|
|
|
237 |
|
238 |
def load_hubert():
|
239 |
global hubert_model
|
240 |
+
# Load the model
|
241 |
+
hubert_model = torch.load("hubert_base.pt", map_location=config.device)
|
242 |
+
|
243 |
+
# Prepare the model
|
|
|
244 |
hubert_model = hubert_model.to(config.device)
|
245 |
if config.is_half:
|
246 |
hubert_model = hubert_model.half()
|
247 |
else:
|
248 |
hubert_model = hubert_model.float()
|
249 |
+
|
250 |
hubert_model.eval()
|
251 |
|
252 |
+
# models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
|
253 |
+
# ["hubert_base.pt"],
|
254 |
+
# suffix="",
|
255 |
+
# )
|
256 |
+
# hubert_model = models[0]
|
257 |
+
|
258 |
|
259 |
weight_root = "weights"
|
260 |
index_root = "logs"
|
requirements.txt
CHANGED
@@ -25,5 +25,4 @@ phonemizer==3.2.1
|
|
25 |
datasets==2.16.0
|
26 |
torchmetrics==0.11.1
|
27 |
whisperx @ git+https://github.com/m-bain/whisperx.git
|
28 |
-
fairseq
|
29 |
# install MFA for getting forced-alignment, this could take a few minutes
|
|
|
25 |
datasets==2.16.0
|
26 |
torchmetrics==0.11.1
|
27 |
whisperx @ git+https://github.com/m-bain/whisperx.git
|
|
|
28 |
# install MFA for getting forced-alignment, this could take a few minutes
|