From 11dccf840fd3fa783df119ede1cabaf272d5b0a9 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: Sat, 1 Apr 2023 19:10:26 +0800 Subject: [PATCH] fix names --- infer-web.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infer-web.py b/infer-web.py index a810c41..db875a2 100644 --- a/infer-web.py +++ b/infer-web.py @@ -64,7 +64,7 @@ weight_root="weights" weight_uvr5_root="uvr5_weights" names=[] for name in os.listdir(weight_root): - if name.endswith(".pt"): names.append(name) + if name.endswith(".pth"): names.append(name) uvr5_names=[] for name in os.listdir(weight_uvr5_root): if name.endswith(".pth"): uvr5_names.append(name.replace(".pth","")) @@ -183,8 +183,8 @@ def get_vc(sid): def change_choices(): for name in os.listdir(weight_root): - if name.endswith(".pt"): names.append(name) - return {"choices": sorted(name), "__type__": "update"} + if name.endswith(".pth"): names.append(name) + return {"choices": sorted(names), "__type__": "update"} def clean():return {"value": "", "__type__": "update"} def change_f0(if_f0_3,sr2):#np7, f0method8,pretrained_G14,pretrained_D15 if(if_f0_3=="是"):return {"visible": True, "__type__": "update"},{"visible": True, "__type__": "update"},"pretrained/f0G%s.pth"%sr2,"pretrained/f0D%s.pth"%sr2