update
This commit is contained in:
parent
4db43592f1
commit
d9479e2a0e
@ -14,6 +14,9 @@ NATIVE_CLIENT_FILE_WIN = os.path.join(sys._MEIPASS, "voice-changer-native-client
|
|||||||
NATIVE_CLIENT_FILE_MAC = os.path.join(sys._MEIPASS, "voice-changer-native-client.app", "Contents", "MacOS",
|
NATIVE_CLIENT_FILE_MAC = os.path.join(sys._MEIPASS, "voice-changer-native-client.app", "Contents", "MacOS",
|
||||||
"voice-changer-native-client") if hasattr(sys, "_MEIPASS") else "voice-changer-native-client"
|
"voice-changer-native-client") if hasattr(sys, "_MEIPASS") else "voice-changer-native-client"
|
||||||
|
|
||||||
|
HUBERT_ONNX_MODEL_PATH = os.path.join(sys._MEIPASS, "model_hubert/hubert_simple.onnx") if hasattr(sys,
|
||||||
|
"_MEIPASS") else "model_hubert/hubert_simple.onnx"
|
||||||
|
|
||||||
|
|
||||||
TMP_DIR = os.path.join(tmpdir.name, "tmp_dir") if hasattr(sys, "_MEIPASS") else "tmp_dir"
|
TMP_DIR = os.path.join(tmpdir.name, "tmp_dir") if hasattr(sys, "_MEIPASS") else "tmp_dir"
|
||||||
os.makedirs(TMP_DIR, exist_ok=True)
|
os.makedirs(TMP_DIR, exist_ok=True)
|
||||||
|
@ -17,7 +17,7 @@ import numpy as np
|
|||||||
import torch
|
import torch
|
||||||
import onnxruntime
|
import onnxruntime
|
||||||
# onnxruntime.set_default_logger_severity(3)
|
# onnxruntime.set_default_logger_severity(3)
|
||||||
|
from const import HUBERT_ONNX_MODEL_PATH
|
||||||
|
|
||||||
import pyworld as pw
|
import pyworld as pw
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class SoVitsSvc40:
|
|||||||
ort_options = onnxruntime.SessionOptions()
|
ort_options = onnxruntime.SessionOptions()
|
||||||
ort_options.intra_op_num_threads = 8
|
ort_options.intra_op_num_threads = 8
|
||||||
self.hubert_onnx = onnxruntime.InferenceSession(
|
self.hubert_onnx = onnxruntime.InferenceSession(
|
||||||
"model_hubert/hubert_simple.onnx",
|
HUBERT_ONNX_MODEL_PATH,
|
||||||
providers=providers
|
providers=providers
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user