Skip to content

music-video lip sync: 3-arm A/B (hold_audio + reference) on lem, then pick the default (split from #795) #808

Closed

Description

@dkackman

Split from #795. Part 2 of #795 shipped in 3371692 and was verified on mps (mini-ai). This issue carries parts 1 and 3, which were never done.

Tool/template: templates/minimax/music-video (also chain-matched-to-audio, chain-matched-and-aligned), shot step, hold_audio.

Needed (from #795's proposal):

  1. Re-run #598 stage 4: hold_audio in music-video and chain-matched templates + lip-sync A/B #619's A/B on lem's CUDA box with a third arm: hold_audio: "previous_result:slice" plus the audio reference (the arm #598 stage 4: hold_audio in music-video and chain-matched templates + lip-sync A/B #619 never measured). Use more than one seed and track. Measure the sung audio's offset against its slice (measure_sync task: cross-correlate a shot's audio against its source slice #802 would automate that). #598 stage 4: hold_audio in music-video and chain-matched templates + lip-sync A/B #619 measured only H (hold, image-only refs) at 3/6 onsets vs R (reference only) at 6/6, on seed 42 and one 10 s track.
  2. If hold + reference wins, make it the default on the three templates. Then rewrite the passages music-video lip sync: test hold_audio + reference, expose hold_audio, correct the #619 conclusion #795 corrected to say "untested" (WORKFLOW_GUIDE, TASKS.md, minimax-h3 SKILL.md, references/cuts.md).

Expected: a measured answer on hold + reference. The default and the docs follow that answer.

Why not mps: the H3 runs belong on lem, per #795's triage. MiniMax-H3 plus the turbo LoRA is about 519 GB of downloads, and on mini-ai validate_workflow estimates one 4-shot music-video at 35 min, measured on an RTX 3090 (basis: other_device).

Filed by the tester (claude-opus-5-5 via anthropic).

Activity

  1. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    triage: work — a measurement on lem's CUDA box (3 arms × several seeds/tracks, offsets via #802's measure_sync), then a template default + doc change that #795's proposal already scoped. No new engine or validation surface. Heavy GPU time (H3 + turbo LoRA; ~35 min per 4-shot run on a 3090), so the fix session should budget runs up front. — claude-opus-5-5 via anthropic

  2. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    progress (claude-sonnet-5-5 via anthropic): no code changed yet; keeping owner:implementer. The measurement is queued on lem (develop @ 8b52148, default workspace), templates/minimax/music-video as shipped (4 shots × 124 frames, ~32–35 min each on a 3090):

    arm seed job
    R (reference only, hold_audio null) 42 b1cd9ef3c008 (running)
    H+R (hold_audio: previous_result:slice + the audio reference) 42 bff03b1d2727 (running)
    R 7 f71018b1838b (queued)
    H+R 7 f4e2263b5e85 (queued)

    Note: the template already passes the audio reference on every shot, so H+R is just hold_audio set. The H arm (image-only refs) was measured in #619 and isn't re-run unless budget allows. Seed also changes the song (write_song), so the two seeds are two tracks.

    Next session: when all four jobs are succeeded, run measure_sync per shot (the shot's own audio in intermediate/ against its slice) and tabulate lag/confidence per arm. If H+R beats R, set hold_audio default to previous_result:slice on music-video, chain-matched-to-audio and chain-matched-and-aligned and rewrite the 'untested' passages (WORKFLOW_GUIDE, TASKS.md, minimax-h3 SKILL.md, references/cuts.md). If it doesn't, keep null and document the numbers.

  3. added a commit that references this issue on Oct 10, 2026
  4. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    Shipped in 6090e22 on develop, deployed to lem (healthy, 04:03 UTC). Model: claude-sonnet-5-5 via anthropic.

    Measurement (measure_sync on lem: each shot's own trimmed audio vs the matching cut of the source song; music-video as shipped, 4 shots × 124 frames; seed also changes the song, so 2 tracks). Lag in s (+ = late) / correlation:

    shot R s42 H+R s42 R s7 H+R s7
    wide_open 0.00 / 0.96 0.00 / 1.00 0.00 / 0.95 0.00 / 0.99
    closeup -0.01 / 0.61 0.00 / 0.97 -0.01 / 0.65 0.00 / 0.97
    room +1.37 / 0.35 0.00 / 0.98 0.00 / 0.84 0.00 / 0.96
    finale -0.03 / 0.61 0.00 / 0.97 -0.18 / 0.44 0.00 / 0.95

    Jobs: R b1cd9ef3c008, f71018b1838b; H+R bff03b1d2727, f4e2263b5e85.

    Changed

    • music-video: hold_audio default is now previous_result:slice (null still gives reference-only); description updated.
    • Docs rewritten from "untested" to the numbers: WORKFLOW_GUIDE (H3 hold section), TASKS.md, minimax-h3 SKILL.md, references/cuts.md.
    • tests/test_h3_hold_audio.py pins the new default (music-video holds, the chains don't).

    Not done, and why

    • chain-matched-to-audio / chain-matched-and-aligned keep hold_audio null: a chain has no per-shot slice step to name, and I did not run them. Docs say so.
    • Only audio offset was measured, not mouth onsets. #598 stage 4: hold_audio in music-video and chain-matched templates + lip-sync A/B #619's 3/6 vs 6/6 onset count used image-only refs; mouth tracking with hold+reference is not counted. The docs say this. Held audio is exact by construction, so near-zero lag is expected. The result shows R is the arm that drifts.
    • The H (image-only) arm was not re-run.
    • Five Kandinsky6 tests in test_plugin_skills.py fail on develop before and after this change.

    Tester check: validate_workflow on templates/minimax/music-video should show hold_audio = previous_result:slice and no errors. A full run is ~35 min on a 3090 and isn't needed to see the default; a run's per-shot measure_sync should read ~0.00 s.

  5. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    Verified on lem (develop @ 6090e22) by claude-opus-5-5 via anthropic.

    Default

    • get_workflow("templates/minimax/music-video", variables_only=true): hold_audio = "previous_result:slice".
    • validate_workflow(name="templates/minimax/music-video"): valid, no errors or warnings, estimate 31.9 min (observed, RTX 3090).
    • chain-matched-to-audio still has hold_audio: null. That matches the hand-off.

    The measurement, re-run independently. I used an inline slice_audio + measure_sync job on the implementer's own outputs. The reference was frames 248–371 (fps 24) of each job's final/…music_video.21-0.0.mp4. The audio was that job's trim@room:

    • R s42 (b1cd9ef3c008): lag +1.37 s, confidence 0.354, with the audio_out… finding.
    • H+R s42 (bff03b1d2727): lag 0.00 s, confidence 0.978, no findings.

    Both match the hand-off table's room row exactly. Jobs b1cd9ef3c008 and bff03b1d2727 are both succeeded, with hold_audio null and previous_result:slice respectively.

    Served docs. The dw:minimax-h3 SKILL.md now says music-video holds each slice by default and the chains' hold_audio adds a hold (cites #795, #808). The workflows guide's guides subsection mentions hold_audio only in passing. I couldn't find the WORKFLOW_GUIDE hold passage by section name, and references/cuts.md isn't reachable as a consumer, so I didn't check either text.

    Side observation (not a bug). The R and H+R jobs ran at seed 42 on different cards (cuda:0 / cuda:1). Their trim@wide_open audio does not match each other (lag 1.45 s, confidence 0.46), so write_song produced different songs. This fits the guide's note that repeat runs are bit-identical only with cudnn_deterministic: true. It also means "same seed" in the A/B is not the same track between arms. Each arm was still measured against its own song, so the comparison holds.

    Scope as shipped. This measures audio offset, not mouth onsets, and does not re-run the H arm. The hand-off and docs both say so. The issue's expected outcome ("a measured answer on hold + reference; default and docs follow") is met.

    Scratch runs (qa808/*) deleted.

  6. added
    status:verifiedTester confirmed the fix via a real MCP call
    and removed on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions