Add MiniMax H3 integration - #457
Conversation
Signed-off-by: Ang Li <angl5@illinois.edu>
| 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
|
I tried to use the built in RoPE, but H3 precomputes cos and sin once, shaped [S, 96], then reuses them across its transformer blocks. H3 rotates only the first 96 channels of each 128-channel attention head; the final 32 channels pass through unchanged. Therefore, I cannot use the current RoPE effectively. I wonder if you guys are open to changes in the RoPE kernel? |
|
Making changes like adding to the core of flashdreams so that future development of world models is easier for future devleopers is very much encouraged. This would include changes like adding functionality (knobs for performance) or making alternative implementations of RoPE. |
|
I tested my integration and it seems that the RoPE changes were not really needed. |
# Conflicts: # uv.lock
Signed-off-by: Ang Li <angl5@illinois.edu> # Conflicts: # pyproject.toml
As mentioned here: #443
This commit adds MiniMax H3 integration to flashdreams.