Fixed for decoder dl speed and mobile warnings on low memory devices.

This commit is contained in:
Lucas Winther
2026-07-29 07:47:42 +02:00
parent 2643a446d0
commit 78e99fc415
7 changed files with 208 additions and 32 deletions
+10
View File
@@ -47,6 +47,16 @@ export interface LoadMessage {
* default for the device it actually selected (src/lib/models.ts).
*/
dtype?: DtypeSpec;
/**
* Load the encoder/decoder ONNX sessions one at a time instead of
* concurrently (D-027/D-029). Sequential halves the peak JS-heap/WASM
* memory a load needs (avoiding mobile tab crashes on larger models) at
* the cost of losing the CDN-concurrency benefit a fast connection would
* otherwise get from two simultaneous downloads — worth paying only where
* the memory-crash risk is real. The UI computes this (`isMobileLoadRisk`
* in App.tsx); omitted/false loads in parallel.
*/
sequentialSessionLoad?: boolean;
}
export interface TranscribeMessage {