From 75b575d81d3e60fb65bf8b2ed6afa76a1e4a480a Mon Sep 17 00:00:00 2001 From: wataru Date: Tue, 9 May 2023 19:20:07 +0900 Subject: [PATCH] bugfix: onnx inferencer nono --- .../voice_changer/RVC/inferencer/OnnxRVCInferencerNono.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/voice_changer/RVC/inferencer/OnnxRVCInferencerNono.py b/server/voice_changer/RVC/inferencer/OnnxRVCInferencerNono.py index 4254b6d2..cdd3b8ea 100644 --- a/server/voice_changer/RVC/inferencer/OnnxRVCInferencerNono.py +++ b/server/voice_changer/RVC/inferencer/OnnxRVCInferencerNono.py @@ -15,12 +15,10 @@ class OnnxRVCInferencerNono(OnnxRVCInferencer): # ort_options = onnxruntime.SessionOptions() # ort_options.intra_op_num_threads = 8 - onnx_session = onnxruntime.InferenceSession( - self.onnx_model, providers=providers - ) + onnx_session = onnxruntime.InferenceSession(file, providers=providers) # check half-precision - first_input_type = self.onnx_session.get_inputs()[0].type + first_input_type = onnx_session.get_inputs()[0].type if first_input_type == "tensor(float)": self.isHalf = False else: