[MiniMax-H3] Load the pruned ComfyUI checkpoints and add single-file support for MiniMax-H3-Image
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #15299 by @guoriyue — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- machine-learning
Research direction
The referenced implementation is PR #15299, already open, so start by reading that diff rather than the issue text alone. The transformers live under src/diffusers/models/transformers/ (MiniMaxH3Transformer3DModel, MiniMaxH3ImageTransformer2DModel), and the single-file mapping is in src/diffusers/loaders/single_file_model.py plus the MiniMax-H3 original-config file in single_file_utils.py. The open design question — whether a new config_from_checkpoint_fn key in the single-file registry is acceptable — needs a maintainer answer before any patch, and done means a pruned ComfyUI checkpoint loads through from_single_file with tests covering the unstripped config path.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
ComfyUI distributes pruned MiniMax-H3 checkpoints (Comfy-Org/MiniMax-H3, Comfy-Org/MiniMax-H3-Image). They cannot be loaded in diffusers today:
- The pruned files replace the timestep MLP and the wide AdaLN projections (about 40% of the parameters) with the activated timestep curve sampled on a 1025-point grid (
adaln_t_table) and 8-input AdaLN projections.MiniMaxH3Transformer3DModelhas no module that matches these weights, andfrom_single_filerefusesadaln_t_table. MiniMaxH3ImageTransformer2DModelhas no single-file support at all (noFromOriginalModelMixin), and the ComfyUI file stores the PDD heads as a stacked bank (head 0 plus per-step offsets) rather than aspdd_proj_out.{i}.
Describe the solution you'd like.
- An opt-in config field (
adaln_curve_grid) on both transformers. When set,time_embedderis a lookup of the sampled curve, linearly interpolated as ComfyUI does, and the AdaLN projections skip their SiLU. Stock configs keep their current behaviour. from_single_filefor both transformers: mapadaln_t_tableto the table, unstack the PDD head bank for the image model, and refuse quantized ComfyUI files with a message naming the bf16 file.
transformer = MiniMaxH3ImageTransformer2DModel.from_single_file(
"https://huggingface.co/Comfy-Org/MiniMax-H3-Image/blob/main/diffusion_models/minimax_h3_image_pruned_bf16.safetensors",
dtype=torch.bfloat16,
)
Design question for maintainers
The repository config on the Hub describes the unpruned model, and no Hub repo carries a pruned diffusers config that a model type could point at. So the pruned shape (adaln_curve_grid, time_embed_dim) has to be read off the checkpoint itself. #15299 does this with a new optional key in the single-file registry, config_from_checkpoint_fn. Is a new registry key acceptable here, or would you prefer another route (for example a separate model type with its own config)?
Additional context.
Implementation proposed in #15299.
- Dominant language
- Python
- Stars
- 35k
- Forks
- 7.5k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 58
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from huggingface/diffusers
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
huggingface/diffusers#15436 · 1 comment ·
Maintainers usually reply within 1 day
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
huggingface/diffusers#15433 ·
Maintainers usually reply within 1 day
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Possibly taken @hparik11 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
huggingface/diffusers#15423 · 2 comments ·
Maintainers usually reply within 1 day
-
Docs: 13 docstrings document parameters their functions don't havePossibly taken @M-Colley claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
huggingface/diffusers#15363 · 2 comments ·
Maintainers usually reply within 1 day
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorPossibly taken @chessing234 claimed this 11 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
huggingface/diffusers#15337 · 3 comments ·
Maintainers usually reply within 1 day
All issues in huggingface/diffusers
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 79/100
developmentseed/titiler-covjson#164 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
awslabs/visual-asset-management-system#2164 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
MakazhanAlpamys/Soup#3589 ·
Maintainers usually reply within 1 day
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketOpen
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day