fix(h3): condicionar cada plano Legacy al tramo correcto de la canción - #20
Conversation
H3 Legacy usaba un contador por plano para el audio_guide, así que el plano 2+ volvía a cortar el inicio del tema. El cursor ahora recorre la línea de tiempo ensamblada, también al reutilizar segmentos. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
PR Review — Loreframe StudioRisk: low Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
…anagement-5ba9 Co-authored-by: THEINAOG <IAnMove@users.noreply.github.com>
There was a problem hiding this comment.
Stale comment
Risk: medium. Dejo un comentario no bloqueante y no apruebo: Cursor Bugbot quedó en skipping, así que hace falta revisión humana. Cursor Security Agent pasó sin hallazgos; no asigné revisores adicionales porque ya hay uno.
Sent by Cursor Approval Agent: Pull Request Router and Approver
#19 already offset the final remux from audio_origin_sec. This branch still walks a single elapsed_frames cursor so shot 2+ slices the song after prior segments. Keep both tests after the conflict in test_director_minimax_h3.py. Co-authored-by: THEINAOG <IAnMove@users.noreply.github.com>
There was a problem hiding this comment.
Risk: medium. Dejo un comentario no bloqueante: los criterios de aprobación se cumplen (Security Agent pasó sin hallazgos; Bugbot no estaba en ejecución), pero GitHub no permite aprobar este PR porque es del mismo autor. No asigné revisores adicionales.
Sent by Cursor Approval Agent: Pull Request Router and Approver


El renderer H3 Legacy (
_run_minimax_h3_story_video) cortaba elaudio_guidecon un contador por plano. El origen era elstartdel clip 0, yshot_elapsed_frames[n]solo sumaba segmentos dentro de ese plano. El plano 2+ volvía a condicionarse sobre el primer tramo de la canción.El camino Omni y
_rerun_clip_video_implya recorrenorigen + frames acumulados. Legacy no.Disparador: videoclip o
short_film_audiocon MiniMax H3 Legacy (·2 planos). Ejemplo: plan[{start:2,end:7},{start:7,end:12}]. El plano 2 se generaba con la canción en 2.000s en vez de ~7.167s → lip-sync y momento musical incorrectos. Al reanudar, reutilizar el segmento 0 tampoco avanzaba el cursor.Fix: un único
elapsed_framesa lo largo de todos los segmentos, incluidos los reutilizados.Validación: ejecución en vivo de
_run_minimax_h3_story_video→ slices[2.0, 7.167]. Tests:test_h3_legacy_music_video_slices_each_shot_from_its_timeline_offsettest_h3_legacy_resume_advances_audio_offset_past_reused_segmentsNo reabre #16, #17, #18 ni #19 (siguen abiertos). Distinto de #19: allí el remux final partía de 0:00; aquí el audio_guide por plano repetía el primer tramo.
Note
Medium Risk
Changes audio-conditioning timing in
_run_minimax_h3_story_videofor legacy music-video paths; behavior is narrow but directly affects generation quality and multi-shot resume.Overview
Fixes incorrect
audio_guidewindows for MiniMax H3 Legacy on multi-shot music videos and audio-driven stories. Soundtrack slices for each render job now use a singleelapsed_framescursor that advances across every segment in assembly order—including reused segments on resume—instead of a per-shot counter that only tracked frames within the current clip.For each driven segment,
clip_startisaudio_origin_sec + elapsed_frames / fps, matching how Omni and clip-rerun walk the timeline. Shot 2+ no longer re-conditions on the first song window (e.g. ~2s instead of ~7s after shot 1), which restores lip-sync and musical timing.Tests assert per-shot slice offsets for a two-clip legacy music video and that resume advances the audio cursor past reused shot-1 frames before rendering shot 2.
Reviewed by Cursor Bugbot for commit 3c0af21. Configure here.