mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-11 21:50:24 +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
@@ -428,7 +428,8 @@ class RVC:
|
|||||||
# return_length2 = torch.LongTensor([return_length2])
|
# return_length2 = torch.LongTensor([return_length2])
|
||||||
return_length = torch.LongTensor([return_length])
|
return_length = torch.LongTensor([return_length])
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
infered_audio = self.net_g.infer(
|
infered_audio = (
|
||||||
|
self.net_g.infer(
|
||||||
feats,
|
feats,
|
||||||
p_len,
|
p_len,
|
||||||
sid,
|
sid,
|
||||||
@@ -436,7 +437,10 @@ class RVC:
|
|||||||
pitchf=cache_pitchf,
|
pitchf=cache_pitchf,
|
||||||
skip_head=skip_head,
|
skip_head=skip_head,
|
||||||
return_length=return_length,
|
return_length=return_length,
|
||||||
).squeeze(1).float()
|
)
|
||||||
|
.squeeze(1)
|
||||||
|
.float()
|
||||||
|
)
|
||||||
upp_res = int(np.floor(factor * self.tgt_sr // 100))
|
upp_res = int(np.floor(factor * self.tgt_sr // 100))
|
||||||
if upp_res != self.tgt_sr // 100:
|
if upp_res != self.tgt_sr // 100:
|
||||||
if upp_res not in self.resample_kernel:
|
if upp_res not in self.resample_kernel:
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ class Pipeline(object):
|
|||||||
p_len = torch.tensor([p_len], device=self.device).long()
|
p_len = torch.tensor([p_len], device=self.device).long()
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
audio1 = (
|
audio1 = (
|
||||||
|
(
|
||||||
net_g.infer(
|
net_g.infer(
|
||||||
feats,
|
feats,
|
||||||
p_len,
|
p_len,
|
||||||
@@ -298,7 +299,11 @@ class Pipeline(object):
|
|||||||
pitch=pitch,
|
pitch=pitch,
|
||||||
pitchf=pitchf,
|
pitchf=pitchf,
|
||||||
)[0, 0]
|
)[0, 0]
|
||||||
).data.cpu().float().numpy()
|
)
|
||||||
|
.data.cpu()
|
||||||
|
.float()
|
||||||
|
.numpy()
|
||||||
|
)
|
||||||
del feats, p_len, padding_mask
|
del feats, p_len, padding_mask
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
|
|||||||
Reference in New Issue
Block a user