Instructions to use Iwannapose/minimax_h3_pdmd_2nfe_comfyui with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Iwannapose/minimax_h3_pdmd_2nfe_comfyui with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("MiniMaxAI/MiniMax-H3", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Iwannapose/minimax_h3_pdmd_2nfe_comfyui") prompt = "A man with short gray hair plays a red electric guitar." output = pipe(prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
PDMD 2-NFE LoRA for MiniMax-H3 β ComfyUI format
ComfyUI-format conversion of the PDMD 2-NFE LoRA
β the 2-step (2 NFE) student distilled from MiniMax-H3-33B with Projected Distribution Matching
Distillation, rank 128, covering attention projections and both feed-forward layers of all 50
transformer blocks + 2 token-refiner blocks.
(Companion repo for the 4-NFE variant: Iwannapose/minimax_h3_pdmd_4nfe_comfyui.)
Files
| file | description |
|---|---|
minimax_h3_pdmd_2nfe_comfyui.safetensors |
ComfyUI conversion, bf16 (recommended), stock-loader compatible. |
minimax_h3_pdmd_2nfe_comfyui_fp32.safetensors |
ComfyUI conversion, fp32 (same values; larger, no precision benefit on GPU). |
The two are numerically identical (the source fp32 file is an exact cast of the bf16 one); the
bf16 file is the one to use. Both are larger than the source because the fused qkv_proj
stores the block-diagonal zero padding explicitly.
What the conversion does
Source keys are Diffusers PEFT names (transformer.transformer_blocks.N.attn.to_q.lora_A.weight β¦);
target keys follow the ComfyUI H3 layout (same scheme as the proven
minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors):
- q/k/v β fused
qkv_proj:A = [A_q; A_k; A_v](rows),B = block_diag(B_q, B_k, B_v), row order[q; k; v](A[384, 5376], B[21504, 384]). - SwiGLU remap: diffusers
SwiGLUoutputs[value; gate], ComfyUI's H3_swiglu_eagerexpects[gate; up]β the two 14336-row halves of everymlp.fc1.lora_Bare swapped. - alpha entries:
qkv_proj = 384(3 Γ 128),out_proj/fc1/fc2 = 128, so ComfyUI'salpha/rankscale = 1.0 = the PDMD fusion scale (W += (B @ A), alpha/rank = 128/128). to_out.0 β attn.out_proj,ff.net.0.proj β mlp.fc1,ff.net.2 β mlp.fc2;transformer_blocks.N β blocks.N,token_refiner.refiner_blocks.N β token_refiner.blocks.N.
Verified: all 468 numeric checks pass against each original (exact in fp32), the key set is
identical to the known-good turbo LoRA, and all 208 target keys exist with matching dimensions
in minimax_h3_ref2va_int8_convrot.safetensors. The conversion output was also diffed
tensor-by-tensor against an independent community converter β identical.
Usage (ComfyUI)
- Node: LoraLoaderModelOnly (model part only β the H3 text encoder is loaded separately).
- Strength: 1.0 (any other value scales the distillation delta and changes the 2-step behavior β do not use it as a partial-style LoRA).
- Sample at 2 denoising steps (the student's operating point); H3 scheduler config (shift 12 video / 3 audio), no CFG (H3 is guidance-distilled).
- Downloads last month
- 5,298
Model tree for Iwannapose/minimax_h3_pdmd_2nfe_comfyui
Base model
MiniMaxAI/MiniMax-H3