From 80bc765cbc9993c797290f25baef67aba0a4b3a4 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: Mon, 10 Apr 2023 18:34:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96print?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infer-web.py | 2 +- vc_infer_pipeline.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/infer-web.py b/infer-web.py index 3067658..d2cd506 100644 --- a/infer-web.py +++ b/infer-web.py @@ -79,7 +79,7 @@ def vc_single(sid,input_audio,f0_up_key,f0_file,f0_method,file_index,file_big_np if(hubert_model==None):load_hubert() if_f0 = cpt.get("f0", 1) audio_opt=vc.pipeline(hubert_model,net_g,sid,audio,times,f0_up_key,f0_method,file_index,file_big_npy,index_rate,if_f0,f0_file=f0_file) - print(times) + print("npy: ", times[0], "s, f0:", times[1], "s, infer: ", times[2], "s", sep='') return "Success", (tgt_sr, audio_opt) except: info=traceback.format_exc() diff --git a/vc_infer_pipeline.py b/vc_infer_pipeline.py index c15ce4e..e05ef4c 100644 --- a/vc_infer_pipeline.py +++ b/vc_infer_pipeline.py @@ -72,7 +72,6 @@ class VC(object): "output_layer": 9, # layer 9 } t0 = ttime() - print("vc npy start time:", t0) with torch.no_grad(): logits = model.extract_features(**inputs) feats = model.final_proj(logits[0]) @@ -87,7 +86,6 @@ class VC(object): feats = F.interpolate(feats.permute(0, 2, 1), scale_factor=2).permute(0, 2, 1) t1 = ttime() - print("vc infer start time:", t1) p_len = audio0.shape[0]//self.window if(feats.shape[1]