Skip to content

feat(minimax-h3): linear UI — generate-tab t2v/i2v and image output mode (PR 4/5) - #59

Merged
lstein merged 2 commits into
mainfrom
minimax-h3/04-linear-ui
Aug 15, 2026
Merged

feat(minimax-h3): linear UI — generate-tab t2v/i2v and image output mode (PR 4/5)#59
lstein merged 2 commits into
mainfrom
minimax-h3/04-linear-ui

Conversation

@lstein

@lstein lstein commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Note

Port of lstein#143 to the InvokeAI-7 tree. Mechanical replay of the original commits onto v7 main (4a48a37967); openapi.json/schema.ts regenerated and verified drift-free at every level, and the dependencies.py auto-merge verified by hand. All changes target the backend and the existing frontend/web app - webv2 is untouched (H3 support in the new UI is future work). Review history and test notes live on the original PR.

Note

Supersedes lstein#141, which GitHub auto-marked as merged (and auto-deleted the branch) when a botched force-push briefly made the head ref equal to its base during a stack rebase. No content was ever merged; this PR carries the identical (rebased) commits.

Summary

PR 4 of the MiniMax H3 stack (on top of lstein#140): the linear UI. H3 becomes usable from the Generate tab (t2v + first-frame i2v with a muxed stereo soundtrack) and, in image output mode, from the canvas as a txt2img base.

What's here

  • Params state: minimaxH3DurationSeconds (5–14 s slider; the 14 s stop maps to the model's true ceiling of 345 frames = 14.375 s) and minimaxH3OutputMode ('video' | 'image') with safeParse-guarded reducers and selectors. Redux-persist _version 4 → 5 with a migrate step seeding both keys (fixtures follow the per-version key-intersection convention). ⚠ The unmerged flux2 branch also claims v5 — whichever merges second renumbers to v6.
  • Graph builder (buildMiniMaxH3Graph.ts): one prompt node (guidance-distilled — no negative prompt, no CFG). Video mode is Generate-tab only: denoise.video_latents/audio_latents → minimax_h3_latents_to_video (+ video/audio VAEs), modes minimax_h3_t2v/minimax_h3_i2v. Frame counts snap to the 17n+5 grid within [124, 345]. Image mode runs the 5-frame minimum block through minimax_h3_latents_to_image + NSFW/watermark (mode minimax_h3_txt2img), canvas-capable.
  • i2v coupling: the first enabled minimax_h3_reference_image feeds the SAME image + dimensions to BOTH the text encoder (vision context) and the frame-conditioning node — the backend denoise node enforces this pairing (PR 3).
  • Ref image type minimax_h3_reference_image (model-less), registered across validators, conversion listeners, and default-config hooks; SUPPORTS_REF_IMAGES_BASE_MODELS gains 'minimax-h3'. The negative-prompt list deliberately does NOT.
  • Dispatch/readiness: 'minimax-h3' cases in both enqueue hooks; canvas readiness blocks video mode with a "video runs on the Generate tab" reason; optimal dimension 768, grid 32.
  • UI: output-mode toggle + duration slider in the Generation accordion (duration hides in image mode); the dead SD Scheduler and CFG Scale controls are hidden for H3. Metadata recall for both new params; "MiniMax H3" strings verbatim (license attribution).

Adversarial review fixes (already in)

  • H3 added to BASES_WITHOUT_STANDARD_SCHEDULER and excluded from CFG Scale — both were rendering as dead controls for a guidance-distilled model.
  • steps clamped to ≥ 2 in the builder (the H3 denoise node's scheduler contract; the shared Steps slider allows 1, which would have 422'd at enqueue).
  • Duration snapping special-cases the 14 s stop to 345 frames, which was previously unreachable (nearest-grid rounding topped out at 328).

Known gaps (deliberate, review-noted)

  • An enabled ref image is silently ignored in image output mode (panel stays visible) — follow-up UX decision.
  • Dims not on the 32-grid can survive a model switch and fail at enqueue — pre-existing failure class shared with wan/cogview4, not introduced here.
  • Duration metadata recall registers but can't fire yet: videos have no per-field recall viewer.

Testing

pnpm lint:tsc / eslint / prettier clean; pnpm test:no-watch 144 files, 1719 tests passed (incl. new v4→v5 migration fixtures); pnpm vite build succeeds.

Manual test gate: Generate tab → MiniMax H3 → 5 s 16:9 t2v with audible audio; ref image → i2v; output mode = Image lands a normal gallery image (also from canvas); metadata recall of duration/output mode.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from minimax-h3/03-nodes to main August 15, 2026 18:07
main landed its own params-slice v4 -> v5 migration (the FLUX.2 [dev]
VAE/encoder merge) while this branch was also using v5 for the MiniMax H3
fields. paramsSlice.ts auto-merged without a conflict, which left two
consecutive `if (state._version === 4)` blocks both assigning 5 — the
first one wins, so the H3 block became dead code. A v4 blob would then
reach zParamsState.parse() with no minimaxH3DurationSeconds /
minimaxH3OutputMode; both are required with no default, so the parse
throws and redux-persist wipes the entire params slice (prompt, seed,
dimensions, every model selection) on upgrade. A v5 blob written by a
released build hits the same path.

The H3 step therefore becomes v5 -> v6, with zParamsState._version and
getInitialParamsState bumped to 6. That covers a v4 blob (through main's
step first) and any already-written v5 blob. Two migration tests cover
both entry points, including the exact v4 case the auto-merge broke; the
existing migration tests now assert the v6 terminus.

The other conflicts were both keep-both: ParamGuidance (main) alongside
the !isMiniMaxH3 CFG-scale guard (this branch), and main's three v3/v4
migration tests alongside this branch's H3 test.

Verified: 1738 frontend tests pass across 144 files, tsc clean, prettier
clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lstein
lstein merged commit 1b3d1fa into main Aug 15, 2026
19 checks passed
@lstein
lstein deleted the minimax-h3/04-linear-ui branch August 15, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant