mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-28 10:35: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")
|
||||
with open(f"configs/inuse/{config_file}", "w") as f:
|
||||
f.write(strr)
|
||||
logger.info("overwrite "+config_file)
|
||||
logger.info("overwrite " + config_file)
|
||||
self.preprocess_per = 3.0
|
||||
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"):
|
||||
names.append(name)
|
||||
index_paths = []
|
||||
|
||||
|
||||
def lookup_indices(index_root):
|
||||
global index_paths
|
||||
for root, dirs, files in os.walk(index_root, topdown=False):
|
||||
for name in files:
|
||||
if name.endswith(".index") and "trained" not in name:
|
||||
index_paths.append("%s/%s" % (root, name))
|
||||
|
||||
|
||||
lookup_indices(index_root)
|
||||
lookup_indices(outside_index_root)
|
||||
uvr5_names = []
|
||||
@ -669,18 +673,18 @@ def train_index(exp_dir1, version19):
|
||||
"%s/trained_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
||||
% (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
|
||||
"%s/%s_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
||||
% (outside_index_root, exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
|
||||
)
|
||||
infos.append(
|
||||
"链接索引到%s"
|
||||
% (outside_index_root)
|
||||
% (
|
||||
outside_index_root,
|
||||
exp_dir,
|
||||
n_ivf,
|
||||
index_ivf.nprobe,
|
||||
exp_dir1,
|
||||
version19,
|
||||
),
|
||||
)
|
||||
infos.append("链接索引到%s" % (outside_index_root))
|
||||
except:
|
||||
infos.append(
|
||||
"链接索引到%s失败"
|
||||
% (outside_index_root)
|
||||
)
|
||||
|
||||
infos.append("链接索引到%s失败" % (outside_index_root))
|
||||
|
||||
infos.append("adding")
|
||||
yield "\n".join(infos)
|
||||
|
Loading…
Reference in New Issue
Block a user