From 200d6713b65046448e3ac78d686e78c92a2076db Mon Sep 17 00:00:00 2001 From: wataru Date: Mon, 27 Mar 2023 15:07:08 +0900 Subject: [PATCH] improve message --- server/voice_changer/SoVitsSvc40/SoVitsSvc40.py | 5 ++++- server/voice_changer/VoiceChanger.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/voice_changer/SoVitsSvc40/SoVitsSvc40.py b/server/voice_changer/SoVitsSvc40/SoVitsSvc40.py index b1622610..7a005f4b 100644 --- a/server/voice_changer/SoVitsSvc40/SoVitsSvc40.py +++ b/server/voice_changer/SoVitsSvc40/SoVitsSvc40.py @@ -134,6 +134,9 @@ class SoVitsSvc40: self.onnx_session.set_providers(providers=[val], provider_options=provider_options) else: self.onnx_session.set_providers(providers=[val]) + elif key == "onnxExecutionProvider" and self.onnx_session == None: + print("Onnx is not enabled. Please load model.") + return False elif key in self.settings.intData: setattr(self.settings, key, int(val)) if key == "gpu" and val >= 0 and val < self.gpu_num and self.onnx_session != None: @@ -259,7 +262,7 @@ class SoVitsSvc40: "c": c, "f0": f0, "g": np.array([self.settings.dstId]).astype(np.int64), - "uv": np.array([self.settings.dstId]).astype(np.int64), + "uv": uv, "predict_f0": np.array([self.settings.dstId]).astype(np.int64), "noice_scale": np.array([self.settings.dstId]).astype(np.int64), diff --git a/server/voice_changer/VoiceChanger.py b/server/voice_changer/VoiceChanger.py index 3441c56b..f9d06994 100755 --- a/server/voice_changer/VoiceChanger.py +++ b/server/voice_changer/VoiceChanger.py @@ -120,7 +120,7 @@ class VoiceChanger(): else: ret = self.voiceChanger.update_setteings(key, val) if ret == False: - print(f"{key} is not mutalbe variable or unknown variable!") + print(f"{key} is not mutable variable or unknown variable!") return self.get_info()