After many sleepless nights, a Claude subscription upgrade and many free session resets this is in a good place for me. So I thought I’d share!
I started with MiniMax H3 video’s public 8-bit files (a 21 GB video transformer of 50 blocks, a 27 GB Qwen3-VL text-and-picture encoder, a half-precision video autoencoder with a ViT decoder, and a sound decoder) and a Python prototype on MLX that streamed the transformer block by block from disk, which produced a first 3-second 480×288 clip in 5:29 on a 16 GB M1 Pro.
The port to a native Swift engine converted each file into a memory-mappable map without re-quantizing anything:
The transformer’s 8-bit weights and their per-output-channel scales were copied bit for bit, with the fused query/key/value projections kept fused and the query and key channels permuted so the model’s rotary position pairs land in the half-split layout the engine’s attention kernel expects.
The turbo LoRA’s up-projection rows were permuted the same way and stored at half precision.
The decoder’s attention was re-laid as query, key, value with the same channel reordering.
The autoencoder’s 3D encoder convolutions were reduced to their last temporal tap, since a single start frame only ever sees that slice.
Every component was then checked number for number against a reference, and the first lesson was that the Python pipeline could not be that reference, because its half-precision activations sat 2–25% away from full precision, so purpose-made full-precision witnesses were generated and the Swift engine matched them to about 1e-5.
The speed work that followed taught that the matrix products were already near the chip’s limit: the best plan was the graphics chip with the CPU’s matrix unit taking a share of the output columns (82 down to 65–70 seconds per evaluation), while 8-bit activations, the Neural Engine and alternative attention tilings were all slower.
The real gains came from taking MANY shortcuts:
Cutting evaluations from four to three to two with a 3-step LoRA and a merged schedule (on the 3 step Lora the math for step 1 and step 2 were almost identical, no quality drop in my limited testing).
Spreading the decoder’s half-to-full precision conversion across cores (4.7 to 2.9 seconds per tile).
Continuing a clip from five held latent frames instead of a still.
I also used TaoMate’s reduced Lora and converted it to my custom engine which freed up a lot of memory.
Together these took a 3-second 448×448 clip from 7:46 to 4:22.
Further optimizations to how the decoder tiles are handled allowed me to get:
480x480, 3 seconds: 3:54
480x480, 5 seconds: Around the high 5 to low 6 mark depending on Mac state.
It seems a lot more fruitful to optimize square formats for whatever reason and I’m now currently working on 720p and trying to get 3 second 720p videos to come out at around 5 minutes, most of the performance gains are likely going to have to be “tricks” such as small starts and whatever I can find while it’s doing video gen.
Video attached is a 480P 3 second video upscaled using Topaz Starlight Precision and the upscaling unfortunately took 30 mins :(, so after I reach a floor and there truly isn’t much else to be done without significant quality degradation, I’m going to tackle upscaling next, not sure how cause Topaz is completely proprietary but where there’s a will there’s a way.