Repository navigation
Conversation
Only the Longpipe mattes could run in f16. MediaPipe and MODNet now offer the same f16 body, f16 storage and accumulation with an f32 camera and mask, behind a "Run the model in f16" option that is off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Pixel Lab already runs the Longpipe mattes with an f16 body:
f32_to_f16withkeep_io, plusTRACT_WGPU_ALLOW_F16_ACCUMULATIONscoped to prepare. This offers the same path for MediaPipe and MODNet as an opt-in.Changes:
models.mjs: anf16Optionflag (set onmediapipe,mediapipe-landscapeandmodnet) andoffersF16()/runsF16(). Longpipe stays always-f16 (f16Body); RVM keeps its fp16 file.worker.js: passesrunsF16(model, f16)toSegmenter::create. No Rust change:createalready takes thef16_bodyflag.main.js/index.html: a "Run the model in f16" checkbox, shown only for those three models and off by default. Changing it restarts the camera session. The status line says "f16" when it is on.Behaviour change: none by default. Lower precision is opt-in, per the repo's precision rule.
Validation:
node --test site/*.test.mjs: all pass, plus a new test of which models offer f16 and howrunsF16treats Longpipe and RVM.Not tested: a real camera, Safari and Firefox.
🍍
🤖 Generated with Claude Code