feat: let the user download and free the cached engine - #15
Merged
Conversation
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.
Reopens #14, which GitHub auto-closed when the author-email history rewrite changed every SHA on
main. Same work, unchanged.The engine is tens of MB of WASM and weights, cached on first use. Taking that much of a phone's storage without asking, and with no way to get it back, is not a reasonable default.
MediaPipeLandmarkSource.load(), which downloads exactly the WASM variant this browser will use; guessing would have fetched both the SIMD and no-SIMD builds and wasted 11 MB.esku-enginecache. It re-downloads next time the camera starts.Content-Lengthrather than by reading 11 MB of WASM into memory to weigh it.Taught signs are deliberately untouched. They are the user's own recordings, they live in IndexedDB, and wiring them into a "free up space" button would be a data-loss trap. The panel says so.
Context worth keeping: this came from a question about the app downloading "3 GB". It does not — that is the SWL-LSE training dataset, downloaded once to train the model and never shipped.