Repository navigation
Conversation
A non-lane family: the 33B diffusion transformer, packed sequence, schedules and joint denoise loop, adapter merging in float32, int8 MLP / QKV / attention output kernels on the M5 tensor units, and the video decoder. The transformer and the float32 video decode equal minimax-h3-mlx's on real inputs. The text encoder, audio decoder and MP4 writer are not ported; tools/h3_generate_dev.py borrows minimax-h3-mlx's. docs/recipes/minimax-h3.md has the measurements. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PrUiTH1dGwnVKrpFLkoGHj
The sampler takes encoded keyframe rows, noises them to 0.999 from the request generator before the video and audio noise (the reference's draw order), holds them for every step and steps only the generated rows. The tool's --first-frame encodes the image with minimax-h3-mlx's VAE encoder and vision tower. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PrUiTH1dGwnVKrpFLkoGHj
Owner
|
Thank you, @drowzeys. Opening this as a proposal, and saying plainly where it sits outside the rules, made it easy to judge. Zero difference against minimax-h3-mlx on a real first step is a careful parity check. We're closing it. TensorFold's engine is built around token lanes, where drafted rows are verified in one forward and match serial decoding exactly. H3 denoises rather than decodes, so there is no lane round for it, and its int8 kernels trade precision, which we don't do. The Python engine is also frozen (#286), and the Zig engine drives Metal directly without MLX, so an MLX family would have nowhere to land. Your GLM-5.3 work in #159 is the kind we want, and it waits for GLM on the Zig engine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, as a proposal. CONTRIBUTING asks for an issue before a new model family, and this one sits outside three of the rules every change must keep. I am opening it as a draft so the code and measurements are in one place for that conversation; close it if a video engine does not belong in TensorFold.
Thank you first: this is built on your family and kernel structure and on the tensor-unit practice in
kernels/qwen/dense/v1/lane_qmm.py. The H3 code itself is adapted from mrbizarro's minimax-h3-mlx, and the int8 scheme follows antirez's h3.c.THIRD_PARTY_NOTICES.mdrecords both.What it is
MiniMax H3 is a joint video and audio diffusion model: a 33B transformer denoises one packed sequence of video, audio and text rows for N steps, then a ViT decodes video tiles. This adds
families/h3andkernels/minimax/h3/v1:fastvideo-lora-v2), merged in float32;docs/recipes/minimax-h3.mdwith the measurements, and rows in the family, kernel and recipe tables.It is two commits on 0.6.5 (
609ca419), all in new files apart from the three table rows andTHIRD_PARTY_NOTICES.md. The second adds first-frame image to video: the sampler holds the encoded keyframe rows at their noise level and steps only the generated rows.Where it does not fit the rules
load, setsLANES = False, andtensorfold servedoes not route it. Nothing in the lane engine, the server or any existing family is touched.It is not complete
tools/h3_generate_dev.pyborrows minimax-h3-mlx's, so the tool needs that repository on the path.tensorfold generate, no checkpoint detection throughfamilies.detect(H3 is a diffusers layout with no rootconfig.json), no resident engine.Receipt
Environment. TensorFold 0.6.5 + this commit, MLX 0.32.3, mlx-lm 0.32.0, Mac Studio M5 Ultra 256 GB, macOS 27.0.1. Checkpoint
MiniMaxAI/MiniMax-H3,FL2VApartition. Adapter: lightx2v MiniMax H3 Turbo v1.0 in runner layout.Exactness.
bench_concurrent.pyandtoken_shado not apply.tools/h3_generate_dev.py --parity: video and audio max difference 0.0 against minimax-h3-mlx7919020on a real first step. Float32 video decode against its decode on real latents: max difference 0.0.Speed, 5 second 864x480 clip, 124 frames, 15,918 rows, same session:
Per block: MLP 81.0 to 41.4 ms, QKV with norm and rotation 46.1 to 22.5 ms, attention output 12.2 to 7.0 ms, attention 92.8 ms unchanged. Video decode 17.3 to 10.7 s at 47.1 dB. For scale on the same Mac: antirez's h3.c takes 7.85 s a step and 202 s for the 20-step clip, so per step this is still slower than h3.c.
Prompt speed. Not applicable; no prefill, kernel, engine or server path of an existing family is changed.
Tests. Host suite on the M5 Ultra: 4979 passed, 609 skipped, 14 failed. The same 14 fail on untouched 0.6.5 in this environment (
tests/control/test_cli.pyx4,tests/control/test_pty.pyx1,tests/test_glm5_prompt_kernels.pyx1,tests/test_lane_fuse.pyx8); I installed.[test]withouttui, and did not look into the lane-fuse and GLM ones. New:tests/test_h3_*.py, 33 tests, which skip the kernel cases where the tensor operations are unavailable. They are new tests for new code, so they did not exist to fail before.What I did not run. Any Mac other than an M5 Ultra: M1-M4 have no tensor units, where the family falls back to bfloat16, untested. Less than 256 GB of memory (the float32 adapter merge peaks at 103 GB). CUDA: the family has no CUDA engine. Picture quality beyond stills: motion and audio were not reviewed by eye or ear.
What did not work
Recorded in the recipe page: an int8 flash-style attention kernel reaches parity with MLX attention and no better (95.5 against 95.8 ms), and block-sparse attention is not sparse enough on this model to pay.
Notes for landing
A packaged install with a one-shot script and sample clips is at https://github.com/drowzeys/keys-Mac-TensorFold-MiniMax-H3-MLX.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PrUiTH1dGwnVKrpFLkoGHj