mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-09 04:29:50 +08:00
chore(format): run black on dev (#46)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8ac5597a3f
commit
83144868e1
@@ -55,6 +55,7 @@ class RMVPE(F0Predictor):
|
|||||||
providers=["DmlExecutionProvider"],
|
providers=["DmlExecutionProvider"],
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
def get_jit_model():
|
def get_jit_model():
|
||||||
jit_model_path = model_path.rstrip(".pth")
|
jit_model_path = model_path.rstrip(".pth")
|
||||||
jit_model_path += ".half.jit" if is_half else ".jit"
|
jit_model_path += ".half.jit" if is_half else ".jit"
|
||||||
@@ -110,9 +111,7 @@ class RMVPE(F0Predictor):
|
|||||||
p_len = wav.shape[0] // self.hop_length
|
p_len = wav.shape[0] // self.hop_length
|
||||||
if not torch.is_tensor(wav):
|
if not torch.is_tensor(wav):
|
||||||
wav = torch.from_numpy(wav)
|
wav = torch.from_numpy(wav)
|
||||||
mel = self.mel_extractor(
|
mel = self.mel_extractor(wav.float().to(self.device).unsqueeze(0), center=True)
|
||||||
wav.float().to(self.device).unsqueeze(0), center=True
|
|
||||||
)
|
|
||||||
hidden = self._mel2hidden(mel)
|
hidden = self._mel2hidden(mel)
|
||||||
if "privateuseone" not in str(self.device):
|
if "privateuseone" not in str(self.device):
|
||||||
hidden = hidden.squeeze(0).cpu().numpy()
|
hidden = hidden.squeeze(0).cpu().numpy()
|
||||||
|
|||||||
Reference in New Issue
Block a user