From eba5da797025c7e1a81345b770217826ccb59a44 Mon Sep 17 00:00:00 2001 From: w-okada Date: Sat, 8 Jul 2023 03:45:02 +0900 Subject: [PATCH] Improvement: onnx on/off --- server/voice_changer/RVC/embedder/EmbedderManager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/voice_changer/RVC/embedder/EmbedderManager.py b/server/voice_changer/RVC/embedder/EmbedderManager.py index 42e011ad..65fcd093 100644 --- a/server/voice_changer/RVC/embedder/EmbedderManager.py +++ b/server/voice_changer/RVC/embedder/EmbedderManager.py @@ -41,6 +41,8 @@ class EmbedderManager: ) -> Embedder: if embederType == "hubert_base": try: + if cls.params.content_vec_500_onnx_on is False: + raise Exception("[Voice Changer][Embedder] onnx is off") file = cls.params.content_vec_500_onnx return OnnxContentvec().loadModel(file, dev) except Exception as e: @@ -52,6 +54,8 @@ class EmbedderManager: return FairseqHubertJp().loadModel(file, dev, isHalf) elif embederType == "contentvec": try: + if cls.params.content_vec_500_onnx_on is False: + raise Exception("[Voice Changer][Embedder] onnx is off") file = cls.params.content_vec_500_onnx return OnnxContentvec().loadModel(file, dev) except Exception as e: