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 logging
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
@ -636,5 +636,5 @@ def train_and_evaluate(
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
torch.multiprocessing.set_start_method("spawn")
|
||||
mp.set_start_method("spawn", force=True)
|
||||
main()
|
||||
|
@ -8,7 +8,6 @@ logger = logging.getLogger(__name__)
|
||||
from functools import lru_cache
|
||||
from time import time
|
||||
|
||||
import faiss
|
||||
import librosa
|
||||
import numpy as np
|
||||
import parselmouth
|
||||
@ -331,9 +330,9 @@ class Pipeline(object):
|
||||
and os.path.exists(file_index)
|
||||
and index_rate != 0
|
||||
):
|
||||
if "faiss" not in sys.modules: import faiss
|
||||
try:
|
||||
index = faiss.read_index(file_index)
|
||||
# big_npy = np.load(file_big_npy)
|
||||
big_npy = index.reconstruct_n(0, index.ntotal)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user