[misc] MiniMax-H3: move the AdaLN converter into scripts/checkpoint_conversion (#1712)
This commit is contained in:
@@ -27,7 +27,8 @@ def parse_args() -> argparse.Namespace:
|
||||
parser.add_argument("--model-path", default="MiniMaxAI/MiniMax-H3")
|
||||
# Rank-reduced AdaLN checkpoint (-39% params, -23 GiB VRAM): pass
|
||||
# --model-path noctuashap/MiniMax-H3-pruned-r16
|
||||
# (or a local dir converted with tools/minimax_h3/fit_adaln_basis.py).
|
||||
# (or a local dir produced by
|
||||
# scripts/checkpoint_conversion/convert_minimax_h3_adaln_rank.py).
|
||||
# adaln_rank is read from the checkpoint config; no other flags needed.
|
||||
# Rank-reduced checkpoints are inference-only: training needs the
|
||||
# full-rank release.
|
||||
|
||||
@@ -27,7 +27,8 @@ def parse_args() -> argparse.Namespace:
|
||||
parser.add_argument("--model-path", default="MiniMaxAI/MiniMax-H3")
|
||||
# Rank-reduced AdaLN checkpoint (-39% params, -23 GiB VRAM): pass
|
||||
# --model-path noctuashap/MiniMax-H3-pruned-r16
|
||||
# (or a local dir converted with tools/minimax_h3/fit_adaln_basis.py).
|
||||
# (or a local dir produced by
|
||||
# scripts/checkpoint_conversion/convert_minimax_h3_adaln_rank.py).
|
||||
# adaln_rank is read from the checkpoint config; no other flags needed.
|
||||
# Rank-reduced checkpoints are inference-only: training needs the
|
||||
# full-rank release.
|
||||
|
||||
@@ -24,7 +24,8 @@ def parse_args() -> argparse.Namespace:
|
||||
parser.add_argument("--model-path", default="MiniMaxAI/MiniMax-H3")
|
||||
# Rank-reduced AdaLN checkpoint (-39% params, -23 GiB VRAM): pass
|
||||
# --model-path noctuashap/MiniMax-H3-pruned-r16
|
||||
# (or a local dir converted with tools/minimax_h3/fit_adaln_basis.py).
|
||||
# (or a local dir produced by
|
||||
# scripts/checkpoint_conversion/convert_minimax_h3_adaln_rank.py).
|
||||
# adaln_rank is read from the checkpoint config; no other flags needed.
|
||||
# Rank-reduced checkpoints are inference-only: training needs the
|
||||
# full-rank release.
|
||||
|
||||
@@ -546,7 +546,7 @@ class MiniMaxH3Transformer3DModel(BaseDiT):
|
||||
"parameter, but factorized AdaLN weights are pinned to FP16 "
|
||||
"(BF16 reconstructs them ~1.7x worse). Fine-tune the full-rank "
|
||||
"checkpoint instead, then re-fit the basis with "
|
||||
"tools/minimax_h3/fit_adaln_basis.py.")
|
||||
"scripts/checkpoint_conversion/convert_minimax_h3_adaln_rank.py.")
|
||||
adaln_dim = self.adaln_rank or arch.time_embed_dim
|
||||
self.adaln_basis = ReplicatedLinear(
|
||||
arch.time_embed_dim,
|
||||
|
||||
@@ -14,6 +14,7 @@ checkpoint_conversion/
|
||||
├── convert_gamecraft_weights.py # DiT only
|
||||
├── convert_gen3c_to_fastvideo.py
|
||||
├── convert_ltx2_weights.py
|
||||
├── convert_minimax_h3_adaln_rank.py # Rank-reduces AdaLN in place; same family
|
||||
├── convert_turbodiffusion_to_diffusers.py
|
||||
├── convert_turbodiffusion_i2v_to_diffusers.py
|
||||
├── extract_llava_text_encoder.py # Encoder extraction from a multimodal repo
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ directly: ``adaln_rank`` in ``config.json`` flows onto the arch config through
|
||||
|
||||
Usage::
|
||||
|
||||
python tools/minimax_h3/fit_adaln_basis.py \
|
||||
python scripts/checkpoint_conversion/convert_minimax_h3_adaln_rank.py \
|
||||
--src /path/to/MiniMax-H3/transformer \
|
||||
--dst /path/to/MiniMax-H3-r16/transformer --rank 16
|
||||
|
||||
Reference in New Issue
Block a user