darksidewalker/MiniMaxH3
Official repository for the GRAVITON weight-space fusion architecture and merged MiniMax H3 audio-video DiT checkpoints.
- GRAVITON Architecture, Mathematical Specification & Engine Author: Darksidewalker
- Official Reference Implementation: darksidewalker/dasiwa-quant-station (
core/model_merge_engine.py, commit69412c0+) - Engine & Workbench License: GPL-3.0-or-later
- Specification & Whitepaper License: CC-BY-SA-4.0 (Attribution + ShareAlike required)
Evolution of MiniMax H3 Merge Architectures
This repository encompasses three generations of model-level H3 fusion recipes implemented in DaSiWa Quant Station. While earlier approaches targeted specific conditioning unifications (fl2va + ref2va), GRAVITONβdesigned and engineered by Darksidewalkerβprovides a mathematically rigorous, calibration-free spectral and polar geodesic framework for arbitrary DiT pairings.
| Recipe | Engine ID | Primary Use Case | Core Mechanism | Key Limitation Solved by Next Generation |
|---|---|---|---|---|
| 1. Hybrid H3 | h3_hybrid |
Grafting ref2va conditioning onto fl2va |
Hard block/row splicing of AdaLN weights & biases (default blocks 30β49) + optional final_layer.audio_out swap. |
Zero interpolation; hard boundaries between block regimes; requires unquantized matching layouts. |
| 2. Delta-Fused H3 | h3_delta |
Single checkpoint serving both keyframe & reference paths | Linear delta injection (W = fl2va + s Β· Ξ) with optional fixed-rank (N) randomized SVD truncation on 2-D trunk matrices. |
Fixed rank ignores aspect ratios; linear interpolation on heterogeneous finetunes/turbos causes variance collapse. |
| 3. GRAVITON | h3_graviton |
Merging any two H3 models (Base, Turbo, Finetunes, W6A8) | Full-spectrum RMT filtering (Gavish-Donoho) + pre-geodesic TIES/EMR sign mediation + row-wise polar SLERP & RegMean norm re-anchoring. | Current architecture β prevents variance drift, spectral tail noise, post-SLERP trajectory warping, and AdaLN black-frame collapse. |
1. GRAVITON (h3_graviton)
Geodesic Rank-Adaptive Variance-Isolated Tensor Orthogonal Normalization
Designed and authored by Darksidewalker.
Authorship & Architectural Lineage
While originally motivated by an unimplemented, four-step community recipe description (OliviaRossi/Minimax-h3_Singularity-x-10Eros-Max_PRISM, which had no published code or formal paper), GRAVITON is an original mathematical formulation and systems implementation by Darksidewalker (core/model_merge_engine.py, commit 69412c0+) that corrects fundamental geometric flaws in prior descriptions and introduces:
- Pre-Geodesic Sign Mediation Ordering: Moves TIES/EMR sign-conflict resolution before spherical interpolation so post-rotation sign flips never knock rows off the geodesic hypersphere.
- Exact Full-Spectrum RMT & Gavish-Donoho Auto-Rank: Replaces arbitrary fixed-rank cutoffs with aspect-ratio-adaptive optimal hard thresholding via exact Gram-matrix eigendecomposition.
- Analytical Marchenko-Pastur Quantization Floor (
tau_quant) & Comfy-Kitchen W6A8 Bridge: Derives exact uniform step-noise variance from QuantStationW6A8scale companions and blocks quantization grid staircases from entering the structural subspace ($L$) or diffuse residual ($R$). - AdaLN Anti-Alignment Protection & Structural Preservation: Prevents the black-video variance collapse caused by per-row SLERP on anti-aligned AdaLN modulation weights or mismatched community coordinate tables.
- Decoupled Float Output: Emits clean floating-point artifacts (
BF16/F16/F32) rather than risking inline quantization packer corruption.
Why GRAVITON?
Merging step-distilled accelerators (8-step Turbo/DMD/LCM), diverse community finetunes, or group-quantized checkpoints into base DiT models triggers four primary failure modes:
- Spectral Tail Contamination: Step distillation concentrates structural trajectory changes into top singular vectors while leaving discretization artifacts in the spectral tail. Fixed-rank truncation (e.g., rank-64) under-fits wide layers and leaks noise from narrow projections.
- Post-Geodesic Trajectory Warping: Applying element-wise sign mediation after spherical interpolation flips components off the hypersphere and destroys the interpolated angle.
- Timestep Conditioning Instability: Scaling deltas by
Ξ± > 1.0or applying per-row SLERP inside adaptive layer norm (adaln) weights causes severe variance drift across denoising steps, resulting in saturated or black-video outputs. - Quantized Manifold Mismatch: Group-quantized checkpoints carry Hadamard-rotated (
ConvRot), bit-packed coordinates whose discretization noise inflates the delta spectrum.
Mathematical Pipeline
Given base weights $A \in \mathbb{R}^{m \times n}$ and target weights $B \in \mathbb{R}^{m \times n}$ with merge strength $t \in (0, 1]$ (extrapolation $t > 1$ is strictly refused):
Stage 0 β Comfy-Kitchen W6A8 Ingestion & Dequantization Bridge (Opt-In)
Fail-closed by default (accepting only F16/BF16/F32). When allow_quantized_inputs is enabled, the engine recognizes QuantStation's exact W6A8 header contract (I8 packed .weight, F8E4M3 .weight_s_rel, F32 .weight_s_channel, and per-layer .comfy_quant JSON) and dequantizes via comfy_kitchen's AsymW4A8Int8Layout.dequantizeβcleanly inverting the ConvRot block-Hadamard rotation ($Q = Q^T = H_b / \sqrt{b}$). From the scale tensors $S = s_{\text{channel}} \cdot s_{\text{rel}}$, the analytical per-element uniform step noise variance is recorded:
Stage 1 β Full-Spectrum RMT Split with Analytical Quantization Floor
For SVD-eligible 2-D trunk matrices, the weight delta $\Delta = B - A$ is decomposed via the exact spectrum of the smaller Gram matrix ($G = \Delta^T \Delta = V \Lambda V^T$, $\sigma_i = \sqrt{\max(\lambda_i, 0)}$):
Singular vectors above $\tau$ form the low-rank structural update $L = (\Delta V_{\text{keep}})V_{\text{keep}}^T$, leaving the diffuse residual $R = \Delta - L$. The denoised target $B_{\text{raw}}$ is reconstructed with an energy-derived halo damping factor: Whenever dequantization noise is present, $\gamma_{\text{halo}}$ is strictly capped at 0.15 so quantization grid staircases in $R$ never survive into the merge. (For float pairs, fixed-rank $N$ via Halko et al. randomized SVD remains available as an opt-out).
Stage 2 β Pre-Geodesic Sign & Interference Mediation
Executed on $B_{\text{raw}}$ before rotation: salient elements ($\vert{}B_{\text{raw}} - A\vert{} \ge \text{row median}$) whose sign conflicts with $A$ resolve to the magnitude-weighted winner ($t \cdot \vert{}B_{\text{raw}}\vert{}$ vs. $(1-t) \cdot \vert{}A\vert{}$, following TIES/EMR logic) to yield $B'$. Performing mediation prior to SLERP guarantees the spherical trajectory remains unwarped.
Stage 3 β Polar Geodesic Interpolation (Row-Wise)
Directional rotation (short-path SLERP) is decoupled from log-space geometric magnitude interpolation per output row $i$: (Falls back to linear interpolation when $\theta_i < 10^{-4}$; negates $\hat{A}_i$ for the short path when $\cos\theta_i < 0$).
Stage 4 β Magnitude Re-Anchor & Decoupled Float Export
Each row $W_i$ is rescaled to the geometric norm target of the original, pre-denoised parent pair $\Vert{}A_i\Vert{}^{1-t} \cdot \Vert{}B_i\Vert{}^t$ (RegMean-style norm preservation). Merged weights are always emitted as clean floating-point tensors (BF16/F16/F32) and handed to downstream conversion jobs if packed W6A8 output is desired, eliminating inline packer corruption.
Tensor Family & Structural Preservation Policy
GRAVITON routes parameters strictly by architectural role:
- 2-D Trunk Matrices (
attn,mlp,out,proj): Full 4-stage GRAVITON pipeline (Spectral Denoise β Sign Mediation β Polar SLERP β Norm Re-Anchor). - AdaLN Modulation Weights (
ada): Spectral Denoise + purely linear delta (W = A + t Β· Ξ_denoised). Becausefl2vaandref2vaAdaLN rows are strongly anti-aligned, per-row SLERP induces black-video collapse. - Exact 1-D & Conditioning Families (
adaln_t_table/time_embedder, norms, biases,rope.inv_freq): Exact linear interpolationW = A + t(B - A). - Structural-Layer Preserve (
preserve_structural=Trueby default): Protects conditioning-critical keys (adaln_t_table,time_embedder.*,adaln_proj.linear.*, per-block/qk norms,rope.inv_freq,final_layer.*,token_refiner.*, and patch/conditioning projections) by copying them directly from Base (A) when merging checkpoints with custom coordinate-system folds.
Recommended Operational Regimes (h3_graviton)
| Pairing | Anchor (Base A) | Target (Overlay B) | Recommended $t$ | Expected Behavior |
|---|---|---|---|---|
| Base + Turbo (Balanced) | Base bf16 |
8-step Turbo | 0.45 β 0.55 |
Preserves base generative diversity with faster step convergence. |
| Turbo + Base (8-Step Lock) | 8-step Turbo | Base bf16 |
0.20 β 0.30 |
Locks the 8-step distillation schedule while injecting base textures/detail. |
| Base + Base (Finetunes) | Finetune 1 | Finetune 2 | 0.30 β 0.70 |
RMT thresholding strips uncorrelated overfitting noise between finetunes. |
| Turbo + Turbo | Turbo 1 | Turbo 2 | 0.40 β 0.60 |
Combines distilled aesthetics with zero AdaLN variance drift ($t \le 1.0$). |
| Float + W6A8 | Base bf16 |
QuantStation w6a8_g32 |
0.35 β 0.50 |
MP quantization floor blocks grid artifacts from entering $L$; outputs clean bf16. |
2. Earlier Approaches (h3_delta & h3_hybrid)
Delta-Fused MiniMax H3 (h3_delta)
Fuses the full ref2va β fl2va weight delta back into an fl2va base so a single checkpoint serves both keyframe (fl2va) and reference (ref2va) conditioning across both pruned (adaln_t_table) and full (time_embedder) variants:
- Rank
0(Exact): Applies the full uncompressed delta across all tensors (~38 GB output). - Rank
N(SVD-Capped): Applies randomized SVD capped at rank $N$ (e.g., $N = 1024$) to 2-D trunk matrices while keeping norms, biases, timestep tables, and RoPE frequencies exact.
Hybrid MiniMax H3 (h3_hybrid)
A zero-interpolation block/modality surgery recipe that grafts ref2va AdaLN modulation onto an fl2va base:
- Whole-Block Mode: Copies entire
ref2vaAdaLN weights and biases into a selected block range (default blocks30β49of the 50-block grid). - Modality-Row Mode (Experimental): Independently splices
ref2vavideo, audio, and text AdaLN rows across user-selected block grids, with optionalfinal_layer.audio_outweight/bias replacement.
License, Copyright & Attribution
Copyright Β© 2026 Darksidewalker. All rights reserved on original methodology, whitepaper, and merge engine architecture.
This repository operates under a split licensing model to protect original open-source mathematical and software contributions while respecting upstream foundation model weights:
- GRAVITON Engine & DaSiWa Quant Station Implementation (
core/model_merge_engine.py):
Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). Any software derivative, port, or integration of the merge engine must remain open-source under GPL-3.0-or-later and preserve full copyright andNOTICEattribution to Darksidewalker. - GRAVITON Whitepaper, Mathematical Formulation & Documentation:
Licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA-4.0). Any adaptations or derivative specifications must credit Darksidewalker and be distributed under the same license. - Merged Model Checkpoints (
.safetensors):
Merged weights are derivative artifacts of the MiniMax H3 base models and remain subject to the upstream MiniMax H3 Community License Agreement (minimax-h3-community-license-agreement, as applied to MiniMaxAI/MiniMax-H3) and its acceptable use policies. When redistributing checkpoints merged with GRAVITON, preserve the.safetensorsheader provenance keys (minimax_h3_graviton=bakedandh3_graviton_*metadata).
Citation
If you use the GRAVITON merge architecture, the analytical W6A8 Marchenko-Pastur quantization floor, or checkpoints from this repository in your research, merge toolkits, or derivative models, please cite:
@software{darksidewalker2026graviton,
author = {Darksidewalker},
title = {{GRAVITON: Geodesic Rank-Adaptive Variance-Isolated Tensor Orthogonal Normalization (DaSiWa Quant Station)}},
year = {2026},
month = nov,
publisher = {GitHub / Hugging Face},
license = {GPL-3.0-or-later},
url = {https://github.com/darksidewalker/dasiwa-quant-station},
howpublished = {\url{https://huggingface.co/darksidewalker/MiniMaxH3}},
note = {Reference implementation in dasiwa-quant-station (core/model_merge_engine.py, commit 69412c0)}
}
References & Grounded Analogs
- Optimal Singular Value Hard Thresholding: Gavish & Donoho, The Optimal Hard Threshold for Singular Values is $4/\sqrt{3}$ (arXiv:1305.5870)
- Randomized Low-Rank Matrix Approximation: Halko, Martinsson, & Tropp (arXiv:0909.4061)
- DARE (Drop And REscale): Yu et al. (arXiv:2311.03099)
- TIES-Merging & EMR-Merging (Sign Conflict Mediation): Yadav et al. (arXiv:2306.01708) / Huang et al. (arXiv:2405.17461)
- Spherical Linear Interpolation (MergeKit): Goddard et al. (arXiv:2403.13257)
- RegMean (Norm Preservation): Jin et al. (arXiv:2212.09849)
- Upstream Community Inspirations:
OliviaRossi/Minimax-h3_Singularity-x-10Eros-Max_PRISM(conceptual inspiration) anddiffusers-modular/MiniMax-H3-Pruned-Ref-Delta-Fused-r1024


