Skip to content

feat(video): modernize MiniMax provider (Hailuo-02) + conform clips to the storyboard - #62

Merged
johnhenry merged 2 commits into
mainfrom
feat/minimax-hailuo-02
Jul 23, 2026
Merged

feat(video): modernize MiniMax provider (Hailuo-02) + conform clips to the storyboard#62
johnhenry merged 2 commits into
mainfrom
feat/minimax-hailuo-02

Conversation

@johnhenry

Copy link
Copy Markdown
Contributor

What

E2 of the format-taxonomy examples plan: makes MiniMax usable as the batch provider for the 12 example videos.

  • Provider modernization: legacy host (api.minimaxi.chat) and model (video-01-live2d) → api.minimax.io + MiniMax-Hailuo-02 (model/resolution/base_url configurable via provider_config). The old _submit silently dropped duration/aspect_ratio — it now sends duration quantized to Hailuo's real clip lengths (6s/10s) and resolution (default 1080P). Hailuo has no aspect-ratio parameter (landscape-only) — documented instead of implied otherwise.
  • normalize_clips() in ai-video compose: conforms every provider clip to the storyboard before concat — trim to scene duration (kills the 1s/scene narration desync from 6s clips under 5s scenes), cover-crop to the target aspect (this is how 9:16 vertical exists at all on landscape-only APIs), constant fps/pix_fmt for the stream-copy concat, clip audio stripped unless keep_audio (reserved for the upcoming Veo native-audio path). Idempotent on resume.

Tests

New: duration quantization, submit payload contents, new-host defaults, normalize command construction (trim/crop/fps/-an), idempotency + keep_audio. Updated: two compose tests stub the normalize step (it has its own tests). Full suite: 631 passed, only the 4 pre-existing missing-soundfile failures.

Verified MiniMax's current API params against their platform docs (duration enum [6,10], resolution [768P,1080P], no aspect_ratio).

…oards, runbook
Wave 0 of the format-taxonomy validation effort: 12 example videos (one
per short-form subcategory) that double as generation-quality benchmarks
and analysis-eval fixtures. This commit adds the scaffolding:
- examples/taxonomy.md — the 12-row category table with each format's
LLM Evaluation Target
- examples/README.md — regeneration runbook + results table skeleton
- examples/storyboards/*.json — 6 hand-authored Plan JSONs for the
storyboard-driven Wave-1 examples (GRWM, storytime, POV, recipe,
unboxing, lip-sync negative fixture); 2.2 faceless-explainer is
deliberately LLM-planned so it exercises the planner itself
- examples/eval-cards/*.md — 12 grading cards: eval target, expected
detections checklist, results template
- examples/results/manifest.json — machine-readable results skeleton
Wave-2 examples (greenscreen, Reddit-TTS, duet, ASMR, multi-character
skit) are blocked on enhancements E1-E5 tracked in the plan; their cards
note the dependency.
…o the storyboard
Two coupled fixes that make ai-video output actually match the plan:
- MiniMax provider targeted a legacy host (api.minimaxi.chat) and model
(video-01-live2d), and silently dropped duration/resolution — the
submit payload sent only model+prompt. Now targets api.minimax.io with
MiniMax-Hailuo-02 (model/resolution/base_url configurable via
provider_config), sends duration quantized to the API's real clip
lengths (6s/10s), and accounts usage at the seconds actually billed.
Hailuo has NO aspect-ratio parameter (landscape-only output) — the
provider docstring now says so instead of implying otherwise via an
unused ASPECT_RATIOS map.
- New normalize_clips() step in ai-video compose: every provider clip is
conformed to the storyboard before concat — trimmed to the scene's
duration (a 5s scene from a 6s Hailuo clip no longer desyncs the
narration track by 1s per scene), cover-cropped to the target aspect
(this is how 9:16 vertical output happens at all on landscape-only
APIs), constant 30fps + yuv420p (the stream-copy concat needs uniform
streams), and clip audio stripped unless keep_audio (reserved for the
native-audio path). Idempotent: normalized clips newer than their
source are reused on resume.
Tests: quantized-duration mapping, submit payload contents, new-host
defaults, normalize command construction (trim/crop/fps/-an), idempotency
+ keep_audio; compose tests stub the normalize step (it has its own
tests). 631 passed; the 4 pre-existing missing-soundfile failures only.
Sign up for freeto 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.

1 participant

@johnhenry