Skip to content

Commit

Permalink
Merge pull request #839 from AznamirWoW/pipeline_fix
Browse files Browse the repository at this point in the history
Another performance improvement ~0.3sec/call
  • Loading branch information
blaisewf authored Oct 26, 2024
2 parents 94dec75 + d5212fb commit 96f9e2d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions rvc/infer/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ def __init__(self, tgt_sr, config):
]
self.autotune = Autotune(self.ref_freqs)
self.note_dict = self.autotune.note_dict

self.model_rmvpe = RMVPE0Predictor(
os.path.join("rvc", "models", "predictors", "rmvpe.pt"),
is_half=self.is_half,
device=self.device,
)
def get_f0_crepe(
self,
x,
Expand Down Expand Up @@ -291,11 +295,6 @@ def get_f0_hybrid(
x, f0_min, f0_max, p_len, int(hop_length)
)
elif method == "rmvpe":
self.model_rmvpe = RMVPE0Predictor(
os.path.join("rvc", "models", "predictors", "rmvpe.pt"),
is_half=self.is_half,
device=self.device,
)
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
f0 = f0[1:]
elif method == "fcpe":
Expand Down Expand Up @@ -356,11 +355,6 @@ def get_f0(
x, self.f0_min, self.f0_max, p_len, int(hop_length), "tiny"
)
elif f0_method == "rmvpe":
self.model_rmvpe = RMVPE0Predictor(
os.path.join("rvc", "models", "predictors", "rmvpe.pt"),
is_half=self.is_half,
device=self.device,
)
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
elif f0_method == "fcpe":
self.model_fcpe = FCPEF0Predictor(
Expand Down

0 comments on commit 96f9e2d

Please sign in to comment.