mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 01:10:22 +08:00
chore(format): run black on dev (#25)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7572c44911
commit
a6c6262d91
@@ -12,7 +12,9 @@ def get_synthesizer_ckpt(cpt, device=torch.device("cpu")):
|
|||||||
elif version == "v2":
|
elif version == "v2":
|
||||||
encoder_dim = 768
|
encoder_dim = 768
|
||||||
net_g = SynthesizerTrnMsNSFsid(
|
net_g = SynthesizerTrnMsNSFsid(
|
||||||
*cpt["config"], encoder_dim=encoder_dim, use_f0 = if_f0==1,
|
*cpt["config"],
|
||||||
|
encoder_dim=encoder_dim,
|
||||||
|
use_f0=if_f0 == 1,
|
||||||
)
|
)
|
||||||
del net_g.enc_q
|
del net_g.enc_q
|
||||||
net_g.load_state_dict(cpt["weight"], strict=False)
|
net_g.load_state_dict(cpt["weight"], strict=False)
|
||||||
|
|||||||
@@ -119,9 +119,7 @@ class RVC(Model):
|
|||||||
rnd = np.random.randn(1, 192, hubert_length).astype(np.float32)
|
rnd = np.random.randn(1, 192, hubert_length).astype(np.float32)
|
||||||
hubert_length = np.array([hubert_length]).astype(np.int64)
|
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()
|
||||||
hubert, hubert_length, pitch, pitchf, ds, rnd
|
|
||||||
).squeeze()
|
|
||||||
|
|
||||||
out_wav = np.pad(out_wav, (0, 2 * self.hop_len), "constant")
|
out_wav = np.pad(out_wav, (0, 2 * self.hop_len), "constant")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user