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 (#23)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e33ef19200
commit
fe7a2bf41a
@@ -212,7 +212,7 @@ class SynthesizerTrnMsNSFsid(nn.Module):
|
||||
# n_res=return_length2
|
||||
)
|
||||
del x_mask, z
|
||||
return o # , x_mask, (z, z_p, m_p, logs_p)
|
||||
return o # , x_mask, (z, z_p, m_p, logs_p)
|
||||
|
||||
|
||||
class SynthesizerTrnMs256NSFsid(SynthesizerTrnMsNSFsid):
|
||||
|
||||
@@ -428,15 +428,19 @@ class RVC:
|
||||
# return_length2 = torch.LongTensor([return_length2])
|
||||
return_length = torch.LongTensor([return_length])
|
||||
with torch.no_grad():
|
||||
infered_audio = self.net_g.infer(
|
||||
feats,
|
||||
p_len,
|
||||
sid,
|
||||
pitch=cache_pitch,
|
||||
pitchf=cache_pitchf,
|
||||
skip_head=skip_head,
|
||||
return_length=return_length,
|
||||
).squeeze(1).float()
|
||||
infered_audio = (
|
||||
self.net_g.infer(
|
||||
feats,
|
||||
p_len,
|
||||
sid,
|
||||
pitch=cache_pitch,
|
||||
pitchf=cache_pitchf,
|
||||
skip_head=skip_head,
|
||||
return_length=return_length,
|
||||
)
|
||||
.squeeze(1)
|
||||
.float()
|
||||
)
|
||||
upp_res = int(np.floor(factor * self.tgt_sr // 100))
|
||||
if upp_res != self.tgt_sr // 100:
|
||||
if upp_res not in self.resample_kernel:
|
||||
|
||||
@@ -291,14 +291,19 @@ class Pipeline(object):
|
||||
p_len = torch.tensor([p_len], device=self.device).long()
|
||||
with torch.no_grad():
|
||||
audio1 = (
|
||||
net_g.infer(
|
||||
feats,
|
||||
p_len,
|
||||
sid,
|
||||
pitch=pitch,
|
||||
pitchf=pitchf,
|
||||
)[0, 0]
|
||||
).data.cpu().float().numpy()
|
||||
(
|
||||
net_g.infer(
|
||||
feats,
|
||||
p_len,
|
||||
sid,
|
||||
pitch=pitch,
|
||||
pitchf=pitchf,
|
||||
)[0, 0]
|
||||
)
|
||||
.data.cpu()
|
||||
.float()
|
||||
.numpy()
|
||||
)
|
||||
del feats, p_len, padding_mask
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
|
||||
Reference in New Issue
Block a user