From 8d5a77dbe96942cb895c15097de46525f5bb18aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:17:51 +0800 Subject: [PATCH] Revert "Format code (#1154)" (#1156) This reverts commit eefb7dbe1d253c13321912a7d10ea186248dcfe1. --- infer/modules/vc/pipeline.py | 4 +++- infer/modules/vc/utils.py | 1 - tools/rvc_for_realtime.py | 11 +---------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/infer/modules/vc/pipeline.py b/infer/modules/vc/pipeline.py index b09ba94..32d973b 100644 --- a/infer/modules/vc/pipeline.py +++ b/infer/modules/vc/pipeline.py @@ -264,7 +264,9 @@ class Pipeline(object): with torch.no_grad(): hasp = pitch is not None and pitchf is not None arg = (feats, p_len, pitch, pitchf, sid) if hasp else (feats, p_len, sid) - audio1 = (net_g.infer(*arg)[0][0, 0]).data.cpu().float().numpy() + audio1 = ( + (net_g.infer(*arg)[0][0, 0]).data.cpu().float().numpy() + ) del hasp, arg del feats, p_len, padding_mask if torch.cuda.is_available(): diff --git a/infer/modules/vc/utils.py b/infer/modules/vc/utils.py index c128707..9517d32 100644 --- a/infer/modules/vc/utils.py +++ b/infer/modules/vc/utils.py @@ -2,7 +2,6 @@ import os from fairseq import checkpoint_utils - def get_index_path_from_model(sid): return next( ( diff --git a/tools/rvc_for_realtime.py b/tools/rvc_for_realtime.py index 5bd68ff..350a128 100644 --- a/tools/rvc_for_realtime.py +++ b/tools/rvc_for_realtime.py @@ -338,14 +338,5 @@ class RVC: .float() ) 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