minimax-h3-image-pdmd-2step
akhaliq/minimax-h3-image-pdmd-2step
- 作者
- akhaliq
- 任务
- 图像生成
- 下载量
- 0
- 点赞数
- 9
- 趋势分
- 9
- 许可证
- apache-2.0
- 收录时间
- 2026/11/11
license: apache-2.0 base_model: MiniMaxAI/MiniMax-H3-Image base_model_relation: adapter library_name: diffusers pipeline_tag: text-to-image tags:
- text-to-image
- image-generation
- lora
- few-step
- distilled
- 2-step
- pdmd
- minimax-h3
- comfyui
- ml-intern
- arxiv:2609.35768
MiniMax-H3-Image pDMD 2-Step LoRA
A true 2-step mode for MiniMaxAI/MiniMax-H3-Image: the pDMD 2-NFE LoRA (arXiv 2609.35768, rank 128 over attention + FFN of all 50 blocks) merged into the official 33.1B image transformer, at the model's native 4096×4096 (16 MP) — no CFG, prompts as written. The stock checkpoint is step-distilled for its fixed 6-step PDD schedule; this LoRA lands a finished image in 2 denoising evaluations on a plain flow-matching grid.
This repo ships the LoRA as one ready-to-use file: lora_model_0.safetensors (bf16, byte-identical
to the upstream pDMD release). Its keys use the native MiniMax naming (blocks.N.attn.qkv_proj,
mlp.fc1) — the exact layout of the official MiniMaxAI/MiniMax-H3-Image checkpoint, so it merges
directly, with no remapping.
Samples — 2 steps
The same twelve prompts throughout — 4096×4096, 2 denoising steps, flow shift 12, seed 3, prompts as written, ~17.7 s per image — so the grids compare tile for tile with each other and with the sister card akhaliq/p-h3-image-pdmd-2step (same prompt set, same recipe).
Why the LoRA matters: the stock transformer at 2 steps is still mid-denoise — compositions are recognizable (it is a step-distilled model, so far from noise), but soft, low-contrast and unfinished. The merged LoRA lands composition, texture and fine detail in the same two evaluations:
| Stock MiniMax-H3-Image, 2 steps | + pDMD 2-step LoRA |
|---|---|
Rendered bf16 with FlashAttention-3 (Hub kernels) on one H200 (peak 84 GB, ~17.7 s/image, all 24 images
in ~13 min) via render_grid.py.
How it was run (and how to reproduce)
The official MiniMaxH3ImagePipeline class is not in a public diffusers release yet, and the official
SGLang/vLLM serving path hard-pins 6 steps. So render_grid.py takes the diffusers
route:
- Convert the official transformer on the fly — stream the 12 official shards and remap them into
the diffusers
MiniMaxH3Transformer3DModellayout with the key mapping vendored fromdiffusers/scripts/convert_minimax_h3_to_diffusers.py(per-head-interleaved fused QKV →to_q/to_k/to_v,[gate; value]halves ofmlp.fc1swapped for diffusers' SwiGLU). All 531 checkpoint keys map; the only uncovered model keys are the 4 unused audio-branch tensors (the image checkpoint has no audio weights). - Run it in the proven P-H3-Image stack — the converted transformer replaces the transformer inside
PrunaAI/P-H3-Image's ModularPipeline (Pruna's Qwen3-VL-4B
text encoder + text connector, video-VAE decoder,
MiniMaxH3Scheduler), the same stack as the sister card. Both grids share conditioning, VAE, seed and scheduler — the comparison is transformer ± LoRA only. - 2 steps:
scheduler.set_shift(12.0),scheduler.set_timesteps(3)(N+1 grid points for N evaluations) and passsigmas=scheduler.sigmas; no CFG, no negative prompt. The stock grid is the identical call without the merge.
Stack: torch 2.13.0, transformers 5.20.2, diffusers @ c55ec279, H200 (141 GB). Peak GPU 84 GB; the
official 66 GB text encoder is not needed in this stack (Pruna's 4B encoder + connector condition the
transformer instead), so the whole run fits comfortably on one H200.
Usage
Merge the LoRA into the official transformer (native keys, no remapping needed — see merge_lora in
render_grid.py, which handles the fused-QKV split for the diffusers layout), then
sample at 2 steps with shift 12 as above. For ComfyUI, use the ComfyUI-named conversion from the sister
repo (minimax_h3_pdmd_2nfe_comfyui.safetensors in
akhaliq/p-h3-image-pdmd-2step) with a simple
BasicScheduler at 2 steps and flow shift 12 — the same operating point.
pDMD's operating point is shift 12 and N+1 timesteps for N denoising evaluations; at 3–4 steps the same merge gets closer to the fully-converged look if 2 steps drifts on your prompt.
License
- The pDMD 2-NFE LoRA is Apache-2.0 (© the pDMD authors; this repo redistributes it unmodified).
- Anything rendered with or derived from MiniMax-H3-Image remains governed by the MiniMax-H3-Image Community License Agreement — read it before use; it carries regional and attribution terms beyond a standard permissive license.
Citation
@misc{wang2026pdmdprojecteddistributionmatching,
title={PDMD: Projected Distribution Matching Distillation for Video Diffusion Models},
author={Zimo Wang and Junkun Yuan and Angtian Wang and Haotian Yang and Canyu Zhang and Siyuan Yuan and Xingchang Huang and Bo Liu and Yizhi Wang and Yiding Yang and Chongyang Ma and Gordon Guocheng Qian},
year={2026},
eprint={2609.35768},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2609.35768},
}
Credits
- Base model: MiniMaxAI/MiniMax-H3-Image (MiniMax)
- 2-step LoRA: pdmd2026/pdmd_2NFE_lora (arXiv 2609.35768)
- Inference stack: PrunaAI/P-H3-Image ModularPipeline (Pruna AI)
- Key conversion:
diffusers/scripts/convert_minimax_h3_to_diffusers.py(Apache-2.0) - Sister card (same treatment for P-H3-Image): akhaliq/p-h3-image-pdmd-2step
- Merge tooling, validation and grids: built with ML Intern, November 2026
内容来源:Hugging Face 模型卡
在 Hugging Face 查看