mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 19:15:04 +08:00
batch_add_faiss_index
batch_add_faiss_index
This commit is contained in:
parent
da34d75ec9
commit
ccf6e6bbd2
10
infer-web.py
10
infer-web.py
@ -694,7 +694,9 @@ def train_index(exp_dir1):
|
||||
# faiss.write_index(index, '%s/trained_IVF%s_Flat_FastScan.index'%(exp_dir,n_ivf))
|
||||
infos.append("adding")
|
||||
yield "\n".join(infos)
|
||||
index.add(big_npy)
|
||||
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.index" % (exp_dir, n_ivf, index_ivf.nprobe),
|
||||
@ -913,7 +915,9 @@ def train1key(
|
||||
"%s/trained_IVF%s_Flat_nprobe_%s.index" % (exp_dir, n_ivf, index_ivf.nprobe),
|
||||
)
|
||||
yield get_info_str("adding index")
|
||||
index.add(big_npy)
|
||||
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.index" % (exp_dir, n_ivf, index_ivf.nprobe),
|
||||
@ -1192,7 +1196,7 @@ with gr.Blocks() as app:
|
||||
minimum=0,
|
||||
maximum=20,
|
||||
step=1,
|
||||
label=i18n("人声提取激进程度"),
|
||||
label="人声提取激进程度",
|
||||
value=10,
|
||||
interactive=True,
|
||||
visible=False, # 先不开放调整
|
||||
|
Loading…
Reference in New Issue
Block a user