mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-01-01 20:45:04 +08:00
Format code (#1154)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
8ffdcb0128
commit
eefb7dbe1d
@ -264,9 +264,7 @@ class Pipeline(object):
|
|||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
hasp = pitch is not None and pitchf is not None
|
hasp = pitch is not None and pitchf is not None
|
||||||
arg = (feats, p_len, pitch, pitchf, sid) if hasp else (feats, p_len, sid)
|
arg = (feats, p_len, pitch, pitchf, sid) if hasp else (feats, p_len, sid)
|
||||||
audio1 = (
|
audio1 = (net_g.infer(*arg)[0][0, 0]).data.cpu().float().numpy()
|
||||||
(net_g.infer(*arg)[0][0, 0]).data.cpu().float().numpy()
|
|
||||||
)
|
|
||||||
del hasp, arg
|
del hasp, arg
|
||||||
del feats, p_len, padding_mask
|
del feats, p_len, padding_mask
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
|
@ -2,6 +2,7 @@ import os
|
|||||||
|
|
||||||
from fairseq import checkpoint_utils
|
from fairseq import checkpoint_utils
|
||||||
|
|
||||||
|
|
||||||
def get_index_path_from_model(sid):
|
def get_index_path_from_model(sid):
|
||||||
return next(
|
return next(
|
||||||
(
|
(
|
||||||
|
@ -338,5 +338,14 @@ class RVC:
|
|||||||
.float()
|
.float()
|
||||||
)
|
)
|
||||||
t5 = ttime()
|
t5 = ttime()
|
||||||
print("Spent time: fea =", t2 - t1, ", index =", t3 - t2, ", f0 =", t4 - t3, ", model =", t5 - t4)
|
print(
|
||||||
|
"Spent time: fea =",
|
||||||
|
t2 - t1,
|
||||||
|
", index =",
|
||||||
|
t3 - t2,
|
||||||
|
", f0 =",
|
||||||
|
t4 - t3,
|
||||||
|
", model =",
|
||||||
|
t5 - t4,
|
||||||
|
)
|
||||||
return infered_audio
|
return infered_audio
|
||||||
|
Loading…
Reference in New Issue
Block a user