Skip to content

fix(h3): condicionar cada plano Legacy al tramo correcto de la canción - #20

Merged
IAnMove merged 3 commits into
mainfrom
cursor/critical-bug-management-5ba9
Aug 29, 2026
Merged

fix(h3): condicionar cada plano Legacy al tramo correcto de la canción#20
IAnMove merged 3 commits into
mainfrom
cursor/critical-bug-management-5ba9

Conversation

@cursor

@cursor cursor Bot commented Aug 28, 2026

Copy link
Copy Markdown

El renderer H3 Legacy (_run_minimax_h3_story_video) cortaba el audio_guide con un contador por plano. El origen era el start del clip 0, y shot_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_impl ya recorren origen + frames acumulados. Legacy no.

Disparador: videoclip o short_film_audio con 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_frames a 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_offset
  • test_h3_legacy_resume_advances_audio_offset_past_reused_segments

No 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.

Open in Web View Automation 

Note

Medium Risk
Changes audio-conditioning timing in _run_minimax_h3_story_video for legacy music-video paths; behavior is narrow but directly affects generation quality and multi-shot resume.

Overview
Fixes incorrect audio_guide windows for MiniMax H3 Legacy on multi-shot music videos and audio-driven stories. Soundtrack slices for each render job now use a single elapsed_frames cursor 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_start is audio_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.

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>
@github-actions

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 2 file(s); +140/-3; backend services

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • No heuristic issues. Still run the CI checklist below.

Changed files

  • modified: app/services/director_pipeline.py, tests/test_director_minimax_h3.py

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

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>
@IAnMove
IAnMove marked this pull request as ready for review August 29, 2026 12:16
@cursor
cursor Bot requested a review from IAnMove August 29, 2026 12:21

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Stale comment

Risk: medium. No apruebo: Cursor Bugbot quedó en skipping y hace falta revisión humana. Asigné revisor; Cursor Security Agent pasó sin hallazgos.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

Open in Web View Automation 

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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@IAnMove
IAnMove merged commit c8820a1 into main Aug 29, 2026
3 of 5 checks passed
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