Repository navigation
feat: M8 model-download progress in #status - #19
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
M8 — Model-download progress in
#statusThe 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 anyprogress_callbackinDefaultProgressCallback(utils/core.js), which emits aggregateprogress_totalevents —progressis 0–100 across ALL weight files — so no manual per-file aggregation was needed.src/depth.jsfilters 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 fakeprogress_totalevents via the__app.__emitProgressseam; per-file events ignored; status returns to the normalDone — …flow. RED pre-change (__emitProgress is not a function) and re-proven RED with productionsrc/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.allload could keep streaming progress that overwrites theDepth 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