1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-09 04:29:50 +08:00

optimize(rvc): move . into layers

This commit is contained in:
源文雨
2024-06-10 22:22:58 +09:00
parent 1a4cb9294e
commit 7572c44911
17 changed files with 19 additions and 18 deletions

View File

@@ -75,7 +75,7 @@ class RVC(Model):
self.vec_model = ContentVec(vec_path, device)
self.hop_len = hop_len
def inference(
def infer(
self,
wav: np.ndarray[typing.Any, np.dtype],
wav_sr: int,
@@ -119,7 +119,7 @@ class RVC(Model):
rnd = np.random.randn(1, 192, hubert_length).astype(np.float32)
hubert_length = np.array([hubert_length]).astype(np.int64)
out_wav = self.__forward(
out_wav = self.forward(
hubert, hubert_length, pitch, pitchf, ds, rnd
).squeeze()
@@ -127,7 +127,7 @@ class RVC(Model):
return out_wav[0:org_length]
def __forward(
def forward(
self,
hubert: np.ndarray[typing.Any, np.dtype[np.float32]],
hubert_length: int,