mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +08:00
fix(train): RuntimeError: context has already been set
This commit is contained in:
parent
b8e0940175
commit
ed96cf1721
@ -3,9 +3,7 @@ import glob
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
import shutil
|
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
@ -636,5 +636,5 @@ def train_and_evaluate(
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
torch.multiprocessing.set_start_method("spawn")
|
mp.set_start_method("spawn", force=True)
|
||||||
main()
|
main()
|
||||||
|
@ -8,7 +8,6 @@ logger = logging.getLogger(__name__)
|
|||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
import faiss
|
|
||||||
import librosa
|
import librosa
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import parselmouth
|
import parselmouth
|
||||||
@ -331,9 +330,9 @@ class Pipeline(object):
|
|||||||
and os.path.exists(file_index)
|
and os.path.exists(file_index)
|
||||||
and index_rate != 0
|
and index_rate != 0
|
||||||
):
|
):
|
||||||
|
if "faiss" not in sys.modules: import faiss
|
||||||
try:
|
try:
|
||||||
index = faiss.read_index(file_index)
|
index = faiss.read_index(file_index)
|
||||||
# big_npy = np.load(file_big_npy)
|
|
||||||
big_npy = index.reconstruct_n(0, index.ntotal)
|
big_npy = index.reconstruct_n(0, index.ntotal)
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user