Instructions to use masra2/MiniMax-H3-Megan-Fox-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use masra2/MiniMax-H3-Megan-Fox-LoRA with PEFT:
Task type is invalid.
- Inference
- Notebooks
- Google Colab
- Kaggle
MiniMax H3 โ "Megan Fox" LoRA (diffusers/PEFT port)
Conversion of Playtime-AI/Minimax_H3-Megan_Fox
(MM-H3 - Megan Fox v1.1.safetensors) from the original kohya/Fizgig layout into the
diffusers-tree PEFT layout that MiniMaxAI/MiniMax-H3 and
MiniMaxAI/MiniMax-H3-Turbo-Lora expect.
Trigger phrase: Megan Fox
What was changed
- Key normalisation.
lora_unet_blocks_20_attn_qkv_proj.lora_down/.lora_up->transformer_blocks.20.attn.to_q/to_k/to_v.lora_A/.lora_B, via the same transformsscripts/convert_minimax_h3_to_diffusers.pyapplies to the base weights:blocks.->transformer_blocks.,token_refiner.blocks.->token_refiner.refiner_blocks.attn.out_proj->attn.to_out.0,mlp.fc2->ff.net.2mlp.fc1->ff.net.0.projwith the two fused SwiGLU halves swapped (store order is[gate; value], diffusers reads[value; gate])attn.qkv_proj->to_q/to_k/to_vby splittinglora_B's 21504 rows into contiguous thirds ofnum_attention_heads * attention_head_dim = 56 * 128 = 7168
- Inert modules dropped. In the source file all 208
lora_downare nonzero butlora_upis all-zero for blocks 0-19 (metadata:ss_photo_blocks = 20-49). Sincedelta = lora_up @ lora_down, those 80 modules are exact no-ops and were removed: 208 -> 192 modules. lora_Bpre-scaled by 2.0. The source hasalpha == rank == 16, i.e. a natural scale of 1.0. The Turbo-Lora Space'slightxloader computesscale = LIGHTX_ALPHA / rank = 8 / 16 = 0.5with a non-configurable constant, so B is pre-multiplied by 2 to land the fold on exactly 1.0.
Row-layout note (do not "fix" this)
The fused QKV is contiguous [q_all; k_all; v_all], not per-head interleaved. Verified two ways:
Fizgig (xmarre/Fizgig) writes split modules at contiguous offsets
(padded_up_weight[sum(split_dims[:i]) : sum(split_dims[:i+1])]), and measurement on this file gives
group-separation 0.175 for contiguous grouping vs 0.023 for interleaved, with row-norm
autocorrelation at lag 7168 at 4.4x the lag-384 (interleave) signature. De-interleaving would
scatter each head's q/k/v across all three projections.
Validated
Every one of the 312 converted targets was checked against
MiniMaxAI/MiniMax-H3/transformer/diffusion_pytorch_model.safetensors.index.json: 0 missing.
Uniform rank 16. No zero tensors. lora_B shape histogram: 96 x (7168,16) q/k/v thirds,
64 x (5376,16) fc2/out_proj, 32 x (28672,16) fc1.
192 modules / 384 tensors, 106,479,544 bytes.
Usage
Environment variables on a duplicate of MiniMaxAI/MiniMax-H3-Turbo-Lora โ no code changes:
H3_LORA=off
H3_LIGHTX_REPO=masra2/MiniMax-H3-Megan-Fox-LoRA
H3_LIGHTX_FILE=mfox-diffusers.safetensors
- Downloads last month
- -
Model tree for masra2/MiniMax-H3-Megan-Fox-LoRA
Base model
MiniMaxAI/MiniMax-H3