Skip to content

Add MiniMax H3 architecture detection for metadata-less GGUF files - #480

Open
uppet wants to merge 1 commit into
city96:mainfrom
uppet:minimax-h3-support
Open

Add MiniMax H3 architecture detection for metadata-less GGUF files#480
uppet wants to merge 1 commit into
city96:mainfrom
uppet:minimax-h3-support

Conversation

@uppet

@uppet uppet commented Sep 8, 2026

Copy link
Copy Markdown

PR/Issue draft — city96/ComfyUI-GGUF

配合 minimax_h3_gguf_support.patch 一起提交到 https://github.com/city96/ComfyUI-GGUF
以下为可直接粘贴的英文说明。


Title: Add MiniMax H3 architecture detection for metadata-less GGUF files

Problem

Community GGUF conversions of the MiniMax H3 video DiT (e.g. unsloth/MiniMax-H3-GGUF) ship without any metadata fields (kv_count=0, no general.architecture). Loading them falls back to tensor-name detection, which fails with:

ValueError: This model is not currently supported - (Unknown model architecture!)

Change

Adds a ModelMiniMaxH3 template detected by three keys unique to the H3 state dict layout — adaln_t_table, blocks.0.adaln_proj.linear.weight, blocks.0.attn.qkv_proj.weight — and registers minimax_h3 in IMG_ARCH_LIST.

The detected names were verified to match the official Comfy-Org safetensors state dict exactly, so once detection passes, core ComfyUI model construction (model_type FLOW_AV) works unchanged. No collisions with existing templates (closest are cosmos's blocks.0.adaln_modulation_cross_attn.1.weight and wan's blocks.0.self_attn.*).

Tested

  • ComfyUI 0.34.0, PyTorch 2.9.1 (ROCm), UnetLoaderGGUF loading minimax_h3_ref2va_pruned-Q4_K.gguf (11.4 GB, 532 tensors): detection succeeds (arch:minimax_h3, loaded in sd.cpp compat mode), state dict keys match the native safetensors one-to-one.
  • Existing arch detection paths untouched; patch only appends to arch_list / IMG_ARCH_LIST.

Community GGUF conversions of the MiniMax H3 video DiT (e.g.
unsloth/MiniMax-H3-GGUF) ship without metadata fields, so loading
falls back to tensor-name detection, which fails with
'This model is not currently supported - (Unknown model architecture!)'.

Add a ModelMiniMaxH3 template detected by adaln_t_table,
blocks.0.adaln_proj.linear.weight and blocks.0.attn.qkv_proj.weight,
and register minimax_h3 in IMG_ARCH_LIST. Tensor names verified to
match the official Comfy-Org safetensors state dict exactly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant