fix WASM (cpu)

This commit is contained in:
Lucas Winther committed 2026-07-10 04:37:01 +02:00
1 parent 3be6721d46
commit 5246fb6b31
3 files changed
+36

No files matched your search

+8
View File
@@ -136,6 +136,14 @@ async function createPipeline(
const asr = await pipeline("automatic-speech-recognition", message.modelId, {
device,
dtype,
// WASM sessions cap graph optimization at "basic" (D-014): the level-2
// QDQ transform in the bundled onnxruntime-web build rejects the 8-bit
// decoders' tied embed_tokens weight ("Missing required scale …
// DequantizeLinear"). q4 models use native MatMulNBits ops, so the
// lower level costs them nothing. WebGPU keeps the default level.
...(device === "wasm" && {
session_options: { graphOptimizationLevel: "basic" as const },
}),
progress_callback: forwardProgress,
});
post({ type: "load-progress", status: "ready", device });