Skip to content

fix(cli): diff stops counting a fast move as an extra cut - #6978

Merged
WaterrrForever merged 2 commits into
mainfrom
miao/diff-extra-cuts-against-motion
Nov 2, 2026
Merged

WaterrrForever merged 2 commits into
mainfrom
miao/diff-extra-cuts-against-motion

Conversation

@WaterrrForever

@WaterrrForever WaterrrForever commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What

hyperframes diff no longer counts a jump in yours as an extra cut when the original moves just as hard at that moment. Those go to not_cuts as fast.

Why

From the reverse-any-video feedback. A regenerated shot never lines up with a whip frame by frame, so diff listed 10 to 16 extra cuts on the museum film, all inside its fast moves. Those hid the real problems: the code-first render's visible purple block was one line among 10.

How

cutsBeyondMotion compares each unmatched cut in yours with the strongest change in the original within a quarter second. It stays an extra cut only above OVER_MOTION (1.5x) of that. The original's own cuts are left out of the comparison, otherwise a cut a few frames late would hide behind the real one. missing does not change.

Extra cuts from the real diff, on 8 renders. Before is after plus the cuts moved to fast; none of these originals has a fast of its own:

Render Before After Still reported
museum, generated 16 2 53.38, 53.75 s: jumps with no match in the original
museum, code first 10 2 21.67 s (a join), 32.13 s (the purple block)
museum, current skill 13 3 49.75, 49.92, 50.58 s: around a late cut
ali 4 1 14.48 s
johnny 1 1 27.65 s: a late cut
ig03 6 3 2.77, 9.37, 17.67 s
astra 1 1 30.97 s
cindy 1 0

The other bench renders had no extra cuts, so this rule cannot change them.

Test plan

fails without the fix: diff.test.ts "reads a change no stronger than the original's motion as the same fast move"

  • diff.test.ts, diff-segments.test.ts, diff-people.test.ts: 35 passed, including "reports a cut a few frames late as missing and extra".
  • 15 real cuts spliced in at quiet and fast moments of the museum film, 7 in ali, 6 in ig03: all 28 the detector found stayed extra cuts, including those inside whips. Two splices were not found by the detector itself.
  • By eye, 6 of the extras it dropped on live footage (ali, ig03, cindy) show the same change in the original.
  • OVER_MOTION is tuned on these films. A weak real cut inside a fast move can still pass as motion.

A regenerated shot never lines up with a whip frame by frame, so diff listed every fast move.

A jump now counts only above the original's own motion around it.

fails without the fix: reads a change no stronger than the original's motion as the same fast move

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at d29fb1537840d9593af85f0e5b4589a8d10f683a.

The motion comparison is applied only to unmatched cuts, leaves missing cuts unchanged, and excludes original cut spans from its local motion baseline.

Need: yes · Size: ok, two files · Reuse: classifiedCuts, frameChanges and existing cut matching · Simpler: already minimal · Structure: fine
Risk: low — local diff diagnostic/classification change, no generation or billing path changed.

Validation: node node_modules/vitest/vitest.mjs run src/measure/diff.test.ts src/measure/diff-segments.test.ts src/measure/diff-people.test.ts: 35 passed on this exact head, including the existing delayed-cut regression. Disabling the new unmatched-cut motion filter makes its suppression witness fail while its quiet-baseline/true-cut and delayed-original-cut unit controls still pass. Independent source-module controls cover 24/30/60 fps windows, first/last transitions and multi-frame original-cut exclusion.

The 1.5 threshold is a disclosed heuristic: weaker real cuts during fast motion can be suppressed. I did not rerun the eight-render museum/bench corpus or validate its reported counts.

Verdict: APPROVE
Reasoning: No blocking regression found in the changed path and its callers. The limited scope and disclosed validation limits support landing.

— hf-review

@WaterrrForever
WaterrrForever added this pull request to the merge queue Nov 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 2, 2026
… miao/diff-extra-cuts-against-motion

# Conflicts:
#	packages/cli/src/measure/diff.test.ts
#	packages/cli/src/measure/diff.ts

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at ddbd50d9faa4cb1b95a5fca9603462e73e3277fc (merge-only re-review).

The resolution preserves both reviewed changes: cutsBeyondMotion and cutReport are byte-identical to approved d29fb1537; rateWarning, projectRate and their warning insertion are byte-identical to approved #6976 at 029fc5ee4. Against the merged main parent, only the two original diff files change.

Need: yes · Size: ok, two-file increment · Reuse: existing cut classifier and composition FPS parser · Simpler: already minimal · Structure: fine
Risk: low — combines the two previously reviewed diff changes without changing their logic.

Validation: node node_modules/vitest/vitest.mjs run src/measure/diff.test.ts src/measure/diff-segments.test.ts src/measure/diff-people.test.ts: 38 passed on this head, including frame-rate warnings, motion suppression and delayed cuts. Independent source review found no merge-resolution blocker. No film-corpus or full browser project-capture rerun; the disclosed 1.5x heuristic limitation remains.

Verdict: APPROVE
Reasoning: Both implementations and their tests survive the resolution; no new blocker found. Unrelated main changes are inherited, outside this focused merge review.

— hf-review

@WaterrrForever
WaterrrForever added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit b1316e6 Nov 2, 2026
71 checks passed
@WaterrrForever
WaterrrForever deleted the miao/diff-extra-cuts-against-motion branch November 2, 2026 05:11
taggedzi pushed a commit to taggedzi/hyperframes that referenced this pull request Nov 2, 2026
Add heygen-com#6973 and heygen-com#6978, which merged ahead of the release PR and shipped in
v0.9.0 without an entry. Correct the PLAN_TOO_LARGE upgrade note: the
plan-size cap only applied to Plan v1, and Plan v2 never raises it.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants