Spaces:
Running
Running
NakliTechie commited on
Commit ·
fb7b801
1
Parent(s): 79786d7
Sync from GitHub 2026-10-22T19:41:38Z
Browse files- index.html +6 -2
index.html
CHANGED
|
@@ -24030,11 +24030,15 @@ const THINK_CLOSE = -2;
|
|
| 24030 |
|
| 24031 |
export const ANYFORMER_URL = 'https://cdn.jsdelivr.net/gh/NakliTechie/anyformer.js@v0.2.4/index.js';
|
| 24032 |
|
| 24033 |
-
// anyformer's progress events → the engine events the SSD worker posts
|
|
|
|
|
|
|
|
|
|
| 24034 |
function toEngineProgress(e) {
|
| 24035 |
if (!e) return null;
|
| 24036 |
if (e.status === 'download') return { status: 'weights', loaded: e.loaded, total: e.total };
|
| 24037 |
-
if (e.status === '
|
|
|
|
| 24038 |
return null;
|
| 24039 |
}
|
| 24040 |
|
|
|
|
| 24030 |
|
| 24031 |
export const ANYFORMER_URL = 'https://cdn.jsdelivr.net/gh/NakliTechie/anyformer.js@v0.2.4/index.js';
|
| 24032 |
|
| 24033 |
+
// anyformer's progress events → the engine events the SSD worker posts. The llama.cpp path reports 'download' (bytes
|
| 24034 |
+
// into OPFS) and 'load' / 'plan'; a hand engine (diskformer back end) reports its own engine events, 'weights' with
|
| 24035 |
+
// bytes while it ingests and with kind 'tensors' while it uploads, and 'init'. Every byte event must reach the worker:
|
| 24036 |
+
// the page's load watchdog ends a load that reports no progress for 3 minutes (the Ling production check, 2026-10-23).
|
| 24037 |
function toEngineProgress(e) {
|
| 24038 |
if (!e) return null;
|
| 24039 |
if (e.status === 'download') return { status: 'weights', loaded: e.loaded, total: e.total };
|
| 24040 |
+
if (e.status === 'weights') return { status: 'weights', kind: e.kind, loaded: e.loaded, total: e.total };
|
| 24041 |
+
if (e.status === 'load' || e.status === 'plan' || e.status === 'init') return { status: 'init' };
|
| 24042 |
return null;
|
| 24043 |
}
|
| 24044 |
|