mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 21:45:00 +03:00
Improvement:
onnx on/off
This commit is contained in:
parent
caa8c99f14
commit
eba5da7970
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user