mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 01:10:22 +08:00
fix: train parameter concating
This commit is contained in:
38
infer-web.py
38
infer-web.py
@@ -589,7 +589,7 @@ def click_train(
|
||||
)
|
||||
)
|
||||
if gpus16:
|
||||
cmd += '-g "%s"' % (gpus16)
|
||||
cmd += ' -g "%s"' % (gpus16)
|
||||
|
||||
logger.info("Execute: " + cmd)
|
||||
p = Popen(cmd, shell=True, cwd=now_dir)
|
||||
@@ -663,33 +663,25 @@ def train_index(exp_dir1, version19):
|
||||
batch_size_add = 8192
|
||||
for i in range(0, big_npy.shape[0], batch_size_add):
|
||||
index.add(big_npy[i : i + batch_size_add])
|
||||
faiss.write_index(
|
||||
index,
|
||||
"%s/added_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
||||
% (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
|
||||
index_save_path = "%s/added_IVF%s_Flat_nprobe_%s_%s_%s.index" % (
|
||||
exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19
|
||||
)
|
||||
infos.append(
|
||||
"成功构建索引 added_IVF%s_Flat_nprobe_%s_%s_%s.index"
|
||||
% (n_ivf, index_ivf.nprobe, exp_dir1, version19)
|
||||
faiss.write_index(index, index_save_path)
|
||||
infos.append(f"{i18n("成功构建索引到")} {index_save_path}")
|
||||
link_target = "%s/%s_IVF%s_Flat_nprobe_%s_%s_%s.index" % (
|
||||
outside_index_root,
|
||||
exp_dir1,
|
||||
n_ivf,
|
||||
index_ivf.nprobe,
|
||||
exp_dir1,
|
||||
version19,
|
||||
)
|
||||
try:
|
||||
link = os.link if platform.system() == "Windows" else os.symlink
|
||||
link(
|
||||
"%s/added_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_dir1,
|
||||
n_ivf,
|
||||
index_ivf.nprobe,
|
||||
exp_dir1,
|
||||
version19,
|
||||
),
|
||||
)
|
||||
infos.append("链接索引到外部-%s" % (outside_index_root))
|
||||
link(index_save_path, link_target)
|
||||
infos.append(f"{i18n("链接索引到外部")} {link_target}")
|
||||
except:
|
||||
infos.append("链接索引到外部-%s失败" % (outside_index_root))
|
||||
infos.append(f"{i18n("链接索引到外部")} {link_target} {i18n("失败")}")
|
||||
|
||||
# faiss.write_index(index, '%s/added_IVF%s_Flat_FastScan_%s.index'%(exp_dir,n_ivf,version19))
|
||||
# infos.append("成功构建索引,added_IVF%s_Flat_FastScan_%s.index"%(n_ivf,version19))
|
||||
|
||||
Reference in New Issue
Block a user