mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-01-11 08:52:55 +00:00
fix: wasm webgl
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sbv2",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "Style Bert VITS2 wasm",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -21,9 +21,5 @@
|
||||
"dependencies": {
|
||||
"onnxruntime-web": "^1.19.2"
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
"package.json",
|
||||
"README.md"
|
||||
]
|
||||
"files": ["dist/*", "package.json", "README.md"]
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ export class ModelHolder {
|
||||
}
|
||||
public static async create(tok: string, deberta: ArrayBufferLike) {
|
||||
return new ModelHolder(
|
||||
await wasm.load_tokenizer(tok),
|
||||
wasm.load_tokenizer(tok),
|
||||
await InferenceSession.create(deberta, {
|
||||
executionProviders: ["webnn", "webgpu", "webgl", "wasm", "cpu"],
|
||||
executionProviders: ["webnn", "webgpu", "wasm", "cpu"],
|
||||
graphOptimizationLevel: "all",
|
||||
}),
|
||||
);
|
||||
@@ -92,7 +92,7 @@ export class ModelHolder {
|
||||
public async load(name: string, b: Uint8Array) {
|
||||
const [style, vits2_b] = wasm.load_sbv2file(b);
|
||||
const vits2 = await InferenceSession.create(vits2_b as Uint8Array, {
|
||||
executionProviders: ["webnn", "webgpu", "webgl", "wasm", "cpu"],
|
||||
executionProviders: ["webnn", "webgpu", "wasm", "cpu"],
|
||||
graphOptimizationLevel: "all",
|
||||
});
|
||||
this.models.set(name, [vits2, style]);
|
||||
|
||||
Reference in New Issue
Block a user