mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 02:55:05 +08:00
chore(format): run black on dev (#1750)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
380fd52085
commit
267192fd92
@ -132,7 +132,7 @@ class Config:
|
|||||||
strr = f.read().replace("true", "false")
|
strr = f.read().replace("true", "false")
|
||||||
with open(f"configs/inuse/{config_file}", "w") as f:
|
with open(f"configs/inuse/{config_file}", "w") as f:
|
||||||
f.write(strr)
|
f.write(strr)
|
||||||
logger.info("overwrite "+config_file)
|
logger.info("overwrite " + config_file)
|
||||||
self.preprocess_per = 3.0
|
self.preprocess_per = 3.0
|
||||||
logger.info("overwrite preprocess_per to %d" % (self.preprocess_per))
|
logger.info("overwrite preprocess_per to %d" % (self.preprocess_per))
|
||||||
|
|
||||||
|
24
infer-web.py
24
infer-web.py
@ -139,12 +139,16 @@ for name in os.listdir(weight_root):
|
|||||||
if name.endswith(".pth"):
|
if name.endswith(".pth"):
|
||||||
names.append(name)
|
names.append(name)
|
||||||
index_paths = []
|
index_paths = []
|
||||||
|
|
||||||
|
|
||||||
def lookup_indices(index_root):
|
def lookup_indices(index_root):
|
||||||
global index_paths
|
global index_paths
|
||||||
for root, dirs, files in os.walk(index_root, topdown=False):
|
for root, dirs, files in os.walk(index_root, topdown=False):
|
||||||
for name in files:
|
for name in files:
|
||||||
if name.endswith(".index") and "trained" not in name:
|
if name.endswith(".index") and "trained" not in name:
|
||||||
index_paths.append("%s/%s" % (root, name))
|
index_paths.append("%s/%s" % (root, name))
|
||||||
|
|
||||||
|
|
||||||
lookup_indices(index_root)
|
lookup_indices(index_root)
|
||||||
lookup_indices(outside_index_root)
|
lookup_indices(outside_index_root)
|
||||||
uvr5_names = []
|
uvr5_names = []
|
||||||
@ -669,18 +673,18 @@ def train_index(exp_dir1, version19):
|
|||||||
"%s/trained_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
"%s/trained_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
||||||
% (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
|
% (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
|
||||||
"%s/%s_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
"%s/%s_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
||||||
% (outside_index_root, exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
|
% (
|
||||||
)
|
outside_index_root,
|
||||||
infos.append(
|
exp_dir,
|
||||||
"链接索引到%s"
|
n_ivf,
|
||||||
% (outside_index_root)
|
index_ivf.nprobe,
|
||||||
|
exp_dir1,
|
||||||
|
version19,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
infos.append("链接索引到%s" % (outside_index_root))
|
||||||
except:
|
except:
|
||||||
infos.append(
|
infos.append("链接索引到%s失败" % (outside_index_root))
|
||||||
"链接索引到%s失败"
|
|
||||||
% (outside_index_root)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
infos.append("adding")
|
infos.append("adding")
|
||||||
yield "\n".join(infos)
|
yield "\n".join(infos)
|
||||||
|
Loading…
Reference in New Issue
Block a user