mirror of
https://github.com/svc-develop-team/so-vits-svc.git
synced 2025-01-07 03:17:31 +08:00
Updata export_index
This commit is contained in:
parent
b306a0ecfa
commit
121205c090
20
export_index_for_onnx.py
Normal file
20
export_index_for_onnx.py
Normal file
@ -0,0 +1,20 @@
|
||||
import os
|
||||
import pickle
|
||||
|
||||
import faiss
|
||||
|
||||
path = "crs"
|
||||
indexs_file_path = f"checkpoints/{path}/feature_and_index.pkl"
|
||||
indexs_out_dir = f"checkpoints/{path}/"
|
||||
|
||||
with open("feature_and_index.pkl",mode="rb") as f:
|
||||
indexs = pickle.load(f)
|
||||
|
||||
for k in indexs:
|
||||
print(f"Save {k} index")
|
||||
faiss.write_index(
|
||||
indexs[k],
|
||||
os.path.join(indexs_out_dir,f"Index-{k}.index")
|
||||
)
|
||||
|
||||
print("Saved all index")
|
Loading…
Reference in New Issue
Block a user