Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- src/worker.ts +3 -2
src/worker.ts
CHANGED
|
@@ -86,8 +86,9 @@ async function loadModel(repoId: string) {
|
|
| 86 |
// Load voices (.npz) and ONNX model in parallel
|
| 87 |
self.postMessage({ type: "status", message: "Downloading model & voices..." });
|
| 88 |
|
| 89 |
-
// onnx-community repos
|
| 90 |
-
const
|
|
|
|
| 91 |
const modelUrl = resolveUrl(repoId, modelFile);
|
| 92 |
|
| 93 |
const modelPromise = (async () => {
|
|
|
|
| 86 |
// Load voices (.npz) and ONNX model in parallel
|
| 87 |
self.postMessage({ type: "status", message: "Downloading model & voices..." });
|
| 88 |
|
| 89 |
+
// onnx-community repos store the model at onnx/model.onnx
|
| 90 |
+
const isOnnxCommunity = repoId.startsWith("onnx-community/");
|
| 91 |
+
const modelFile = isOnnxCommunity ? "onnx/model.onnx" : config.model_file;
|
| 92 |
const modelUrl = resolveUrl(repoId, modelFile);
|
| 93 |
|
| 94 |
const modelPromise = (async () => {
|