Add MiniMax H3 integration - #457
Conversation
Signed-off-by: Ang Li <angl5@illinois.edu>
Greptile SummaryThe PR adds a separately packaged MiniMax H3 integration supporting text-to-video-with-audio, keyframe-conditioned generation, and ordered media references.
Confidence Score: 4/5The 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
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]
Reviews (4): Last reviewed commit: "Optimize MiniMax H3 GPU handoff" | Re-trigger Greptile |
| if frames / FPS > MAX_DURATION: | ||
| raise ValueError("duration aligns beyond MiniMax H3's 15-second maximum") |
There was a problem hiding this comment.
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.
| if frames / FPS > MAX_DURATION: | |
| raise ValueError("duration aligns beyond MiniMax H3's 15-second maximum") |
| frames = self.pipeline.generate(0, cache) | ||
| metrics = self.pipeline.finalize(0, cache) |
There was a problem hiding this comment.
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
|
Tested with both the regular MiniMax H3 and the the Looping-Sketch LoRA on A100. No audio support yet. |
ArielG-NV
left a comment
There was a problem hiding this comment.
questions/suggestions
| else: | ||
| latents = self._generate_standard(cache) | ||
| cache.denoise_seconds = time.monotonic() - denoise_started | ||
| _save_latents(cache, self.config.model_id, latents) |
There was a problem hiding this comment.
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?
As mentioned here: #443
This commit adds MiniMax H3 integration to flashdreams.