improve message

This commit is contained in:
wataru 2023-03-27 15:07:08 +09:00
parent be771843b1
commit 200d6713b6
2 changed files with 5 additions and 2 deletions

View File

@ -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),

View File

@ -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()