Upload chatterbox_utils.py with huggingface_hub
Browse files- chatterbox_utils.py +1 -1
chatterbox_utils.py
CHANGED
|
@@ -118,7 +118,7 @@ def load_chatterbox(device="cuda"):
|
|
| 118 |
if SESSIONS["speech_encoder"]: return
|
| 119 |
print(f"🚀 Loading Chatterbox ONNX into {device}...")
|
| 120 |
opts = onnxruntime.SessionOptions()
|
| 121 |
-
provs = ["CUDAExecutionProvider"] if device == "cuda"
|
| 122 |
|
| 123 |
for sess_name in ["speech_encoder", "embed_tokens", "conditional_decoder", "language_model"]:
|
| 124 |
fname = "onnx/" + (sess_name + ".onnx" if sess_name != "language_model" else "language_model.onnx")
|
|
|
|
| 118 |
if SESSIONS["speech_encoder"]: return
|
| 119 |
print(f"🚀 Loading Chatterbox ONNX into {device}...")
|
| 120 |
opts = onnxruntime.SessionOptions()
|
| 121 |
+
provs = ["CUDAExecutionProvider", "CPUExecutionProvider"] if device == "cuda" else ["CPUExecutionProvider"]
|
| 122 |
|
| 123 |
for sess_name in ["speech_encoder", "embed_tokens", "conditional_decoder", "language_model"]:
|
| 124 |
fname = "onnx/" + (sess_name + ".onnx" if sess_name != "language_model" else "language_model.onnx")
|