Skip to content

Add MiniMax H3 integration - #457

Open
yamada-sexta wants to merge 4 commits into
NVIDIA:mainfrom
yamada-sexta:minimax-h3
Open

Add MiniMax H3 integration#457
yamada-sexta wants to merge 4 commits into
NVIDIA:mainfrom
yamada-sexta:minimax-h3

Conversation

@yamada-sexta

Copy link
Copy Markdown

As mentioned here: #443

This commit adds MiniMax H3 integration to flashdreams.

Signed-off-by: Ang Li <angl5@illinois.edu>
@copy-pr-bot

copy-pr-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a separately packaged MiniMax H3 integration supporting text-to-video-with-audio, keyframe-conditioned generation, and ordered media references.

  • Registers three MiniMax H3 runner configurations.
  • Implements staged conditioning, joint video/audio denoising, decoding, LoRA conversion, and resumable checkpoints.
  • Adds package dependencies and smoke coverage for the integration.

Confidence Score: 4/5

The PR is not yet safe to merge because the supported 15-second boundary still aborts during request initialization.

The current alignment logic accepts 15 seconds as within range, advances its 360 frames to the next decodable count of 362, and then rejects the request before generation.

Files Needing Attention: integrations/minimax_h3/minimax_h3/constants.py

Important Files Changed

Filename Overview
integrations/minimax_h3/minimax_h3/constants.py Defines geometry and duration validation; the maximum-duration alignment defect remains outstanding.
integrations/minimax_h3/minimax_h3/pipeline.py Implements staged conditioning, resumable checkpoints, joint denoising, and video decoding for all three workflows.
integrations/minimax_h3/minimax_h3/runner.py Defines workflow-specific arguments and sequences generation, post-processing, MP4 output, and completion recording.
integrations/minimax_h3/minimax_h3/transformer.py Implements the native H3 transformer configuration, checkpoint mapping, attention selection, and joint video/audio forward path.
integrations/minimax_h3/pyproject.toml Packages the integration and registers its three runner entry points.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Request[MiniMax H3 request] --> Validate[Validate workflow, canvas, and duration]
  Validate --> Condition[Encode prompt and optional media]
  Condition --> Prepare[Prepare video and audio latent streams]
  Prepare --> Denoise[Joint transformer denoising]
  Denoise --> Checkpoint[Persist latent checkpoint]
  Checkpoint --> Decode[Decode video frames]
  Decode --> Output[Write MP4 and completion status]
Loading

Reviews (4): Last reviewed commit: "Optimize MiniMax H3 GPU handoff" | Re-trigger Greptile

Comment on lines +40 to +41
if frames / FPS > MAX_DURATION:
raise ValueError("duration aligns beyond MiniMax H3's 15-second maximum")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Maximum duration fails alignment

When duration is 15 seconds, alignment advances 360 frames to the next decodable count of 362 and then rejects the request, causing the advertised maximum duration to fail before generation starts.

Suggested change
if frames / FPS > MAX_DURATION:
raise ValueError("duration aligns beyond MiniMax H3's 15-second maximum")

Comment on lines +158 to +159
frames = self.pipeline.generate(0, cache)
metrics = self.pipeline.finalize(0, cache)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Exceptional exits leak output target

When generation, finalization, processing, or writing raises after output_target.open(), the runner exits without closing the target, leaking encoder and file resources and leaving a partial MP4 that can interfere with retries.

Knowledge Base Used: Integrations

@yamada-sexta

yamada-sexta commented Aug 13, 2026

Copy link
Copy Markdown
Author

Tested with both the regular MiniMax H3 and the the Looping-Sketch LoRA on A100.

No audio support yet.

@ArielG-NV ArielG-NV left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

questions/suggestions

Comment thread integrations/minimax_h3/minimax_h3/model.py Outdated
Comment thread integrations/minimax_h3/minimax_h3/model.py Outdated
else:
latents = self._generate_standard(cache)
cache.denoise_seconds = time.monotonic() - denoise_started
_save_latents(cache, self.config.model_id, latents)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we could make this async since otherwise we are blocking generate just to generate a cache file we don't immediately need every time we have a new cache?

Comment thread integrations/minimax_h3/minimax_h3/pipeline.py Outdated
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