Repository navigation
Conversation
RyanPCo
commented
Oct 30, 2026
RyanPCo
left a comment
Contributor
Author
There was a problem hiding this comment.
Automated adversarial review (read-only; findings were checked by a second skeptical pass before posting): 1 nit.
| group = norm_group or N | ||
| gid = torch.arange(N, device=device) // group | ||
| n_groups = (N + group - 1) // group | ||
| zeros = torch.zeros(n_groups, device=device) |
Contributor
Author
There was a problem hiding this comment.
nit (naming): Reusing zeros as the base for four index_add calls is correct (out-of-place), but readers have to check that. Use a small group_sum = lambda x: torch.zeros(n_groups, device=device).index_add(0, gid, x) for group_denom, group_count, pos_loss and reg_loss.
RyanPCo
force-pushed
the
ryanco/aria-mano-fit
branch
from
October 30, 2026 19:41
1c4b9a0 to
5734ced
Compare
RyanPCo
force-pushed
the
ryanco/lance-migration-plan
branch
from
October 30, 2026 19:41
72692a6 to
369caa4
Compare
Contributor
Author
|
Review follow-up (force-pushed). The 1 finding is fixed:
|
…2 chunk The fit loss was normalized by the whole batch's valid-point count, so batch size changed each frame's gradient scale and (through Adam eps) the result. Normalize per 512-frame chunk instead and optimize up to --mano-batch frames together. Results match the 512-chunk fit to ~2e-4 mm; MANO time on one 4,587-frame episode drops from 177 s to 83 s per hand on an A40. Claude-Session: https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw
The fit loss uses the 16 kinematic joints and 5 fingertip vertices, but the stock MANO forward skins all 778 vertices every step. mano_joints_fn computes the same 21 joints from the 5 tip vertices only. On one 4,587-frame episode (2400 iters, A40) MANO time drops from 338 s to 52 s for both hands, matching the previous 512-chunk fit to <1e-3 mm. Claude-Session: https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw
RyanPCo
force-pushed
the
ryanco/aria-mano-fit
branch
from
October 30, 2026 23:05
5734ced to
18ae9f1
Compare
RyanPCo
force-pushed
the
ryanco/lance-migration-plan
branch
from
October 30, 2026 23:05
369caa4 to
01cbd79
Compare
Open
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.
Makes the Aria MANO fit, the dominant cost of the raw Aria migration, 6.5x faster without
changing its output. On one 4,587-frame episode (2,400 iters, A40) MANO goes from 338 s to
52 s for both hands, and the keypoints match the previous fit within 1e-3 mm.
aria_to_lance --mano-batch, default 8192): the fit loss was normalized by thewhole batch's valid-point count, so the batch size changed each frame's gradient scale
and, through Adam's eps, the result. The loss is now normalized per 512-frame chunk
(
norm_group), and up to --mano-batch frames are optimized together. Same results asfitting each 512-frame chunk alone (~2e-4 mm); ~2.1x faster on its own.
aria_utils.mano_joints_fn): the loss uses the 16 kinematic jointsand 5 fingertip vertices, but the stock MANO forward skins all 778 vertices every step.
mano_joints_fn regresses the joints from the shaped template and skins only the 5 tip
vertices, giving the same 21 points.
GPU-h for MANO over the 2,569 Aria episodes, down from ~235).
Testing: on a compute node, tests/unit/test_mano_fit.py (new: mano_joints_fn equals the full
forward's joints for both hands; the batched fit with per-chunk normalization equals
fitting each chunk alone) passes with the MANO weights linked in (3 passed); without them it skips. Full unit suite at the top of the stack: 1,565 passed, 5 skipped (3 of the skips are test_mano_fit without weights in the checkout; it passes with them linked in).
🤖 Generated with Claude Code
https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw