Skip to content

feat: M8 model-download progress in #status - #19

Merged
DecodedXR merged 3 commits into
mainfrom
feat/m8-model-download-progress
Jul 8, 2026
Merged

DecodedXR merged 3 commits into
mainfrom
feat/m8-model-download-progress

Conversation

@DecodedXR

Copy link
Copy Markdown
Owner

M8 — Model-download progress in #status

The first photo/webcam model load silently downloaded tens of MB behind a static status line. Now it shows a live Downloading depth model… NN%.

Why it's shaped this way

Confirmed from the installed transformers.js 4.2.0 source (working rule 1): pipeline() wraps any progress_callback in DefaultProgressCallback (utils/core.js), which emits aggregate progress_total events — progress is 0–100 across ALL weight files — so no manual per-file aggregation was needed. src/depth.js filters for the aggregate in one place; the WebGPU pipeline gets the callback directly, the WASM worker relays raw events over the bridge as {type:'progress', event}. Completion needs no special-casing: each call site's next status write ends the readout. Render loop, decoupling machinery, and estimator call sites untouched.

RED test

tests/smoke.spec.js "milestone 8": advancing rounded % from fake progress_total events via the __app.__emitProgress seam; per-file events ignored; status returns to the normal Done — … flow. RED pre-change (__emitProgress is not a function) and re-proven RED with production src/ reverted after the fix was committed (non-tautological). Note: CI can't download the real model, so the pipeline/worker hookup itself is proven by source reading + the seam sharing the production filter, not by CI.

Verifier

Independent adversarial verifier: HOLDS. Confirmed the library-event-shape claims, bridge clone-safety (all events are plain objects), and postMessage FIFO ordering. One real finding: on the WebGPU path a partially-failed Promise.all load could keep streaming progress that overwrites the Depth failed: … status forever. Fixed with a local settled-guard (327887f); the worker path was already immune (worker.terminate()).

Review

Inline pass over the full diff: no unresolved findings.

Results

Full local suite green: 21/21 (--workers=1, chromium + mobile-chromium).

Rollback HEAD: c2f0a9f.

🤖 Generated with Claude Code

DecodedXR and others added 3 commits July 8, 2026 17:23
transformers.js 4.2.0 aggregate progress_total events (confirmed from
installed source: DefaultProgressCallback in utils/core.js) drive a live
"Downloading depth model… NN%" readout. WebGPU path passes the callback
straight to pipeline(); the WASM worker relays raw events over the bridge
and depth.js filters in one place. Test seam __app.__emitProgress.

Autopilot: STATUS.md Milestone 8

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DecodedXR
DecodedXR merged commit 030dfa1 into main Jul 8, 2026
2 checks passed
@DecodedXR
DecodedXR deleted the feat/m8-model-download-progress branch July 8, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant