Repository navigation
feat: port Sapiens2 dense prediction - #2550
Merged
Merged
Conversation
inureyes
force-pushed
the
feature/issue-2371-sapiens2-port
branch
from
October 22, 2026 19:51
f809d13 to
2ae94d4
Compare
Declare exact limits for all five committed Sapiens2 binary fixtures before generic rules, retaining the cumulative DINOv2 and Sapiens2 budget. Normalize two import lists without changing model numerics. Formatting, diff checks, and all eight fast contract targets pass after rebasing onto the merged DINOv2 base.
inureyes
force-pushed
the
feature/issue-2371-sapiens2-port
branch
from
October 22, 2026 20:31
2ae94d4 to
6dfaa4a
Compare
inureyes
marked this pull request as ready for review
October 22, 2026 20:42
This was referenced Oct 24, 2026
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.
Public Sapiens2 checkpoints now run through mlxcel's dense-prediction runtime with their actual ViT backbone and task heads. The port covers pose, semantic segmentation, surface normals, pointmaps, image matting, and backbone features; pose follows the upstream crop, flip-test, DARK, and UDP coordinate path, while dense tasks restore source-resolution outputs.
Changes
sapiens2withmlxcel predictandmlxcel arch, document the task contracts, and add compact, reproducible exact-pin upstream fixtures.Validation
All numerical acceptance checks used the canonical lossless input and an exact-native MLX 0.32.5 reference pinned to
bff10220c742907f0c68e55ff174aaea56f74e3don the same gfx1151 device.result.safetensors,keypoints.json, andmeta.json; the JSON contains 308 named points and the tensor result independently matches upstream within 0.001930 px.-D warnings; CI-equivalent--lib --testsclippy also passed.git diff --checkpasses.Public 0.4B task checkpoints and the 1B matting checkpoint were runtime-validated. The standard 0.8B and 5B architectures use the same bounded config-driven implementation, but their public config URLs were inaccessible during validation, so runtime parity is not claimed for those sizes. Sapiens2 4K tokenizer checkpoints are outside this issue and are rejected explicitly. CPU and ROCm upstream results differ in low-confidence pose points, so acceptance uses the exact-pin same-backend reference without relaxing the original thresholds.
The branch is rebased on current
main. After the shared-core update, the targeted integration build passed, all six real-checkpoint checks repeated with the same metrics, and--lib --testsclippy passed with warnings denied. Fresh PR CI is the remaining external gate.Closes #2371