Skip to content

fix: emit quant format key in INT8ModelSave; add MiniMax H3 model types - #99

Open
plz12345 wants to merge 1 commit into
BobJohnson24:mainfrom
plz12345:minimax-h3-and-quant-format
Open

fix: emit quant format key in INT8ModelSave; add MiniMax H3 model types#99
plz12345 wants to merge 1 commit into
BobJohnson24:mainfrom
plz12345:minimax-h3-and-quant-format

Conversation

@plz12345

Copy link
Copy Markdown

1. INT8ModelSave writes checkpoints core ComfyUI can't load

quant_conf omits format, and comfy/ops.py dispatches on exactly that key, so any
checkpoint saved by this node fails in core's UNETLoader:

ValueError: Unknown quantization format for layer blocks.0.attn.qkv_proj

It loads fine through OTUNetLoaderW8A8, which detects int8 by tensor dtype — so the
breakage only shows up when someone uses the saved file with the native loader. Published
INT8 ConvRot checkpoints carry {"format": "int8_tensorwise", "convrot": true, "convrot_groupsize": 256}; this makes the save node emit the same. Weights and scales are
unchanged, and core has native int8_tensorwise + ConvRot support.

2. MiniMax H3 model types (#95)

With no H3 entry the exclusion list is empty, so adaln_proj (in_features 8),
video_patch_proj (96) and audio_patch_proj (32) get quantized with no rotation — ConvRot
needs in_features % 256 == 0. Excluding them leaves the 200 blocks.N attn/mlp linears,
which is the layout of the H3 INT8 ConvRot checkpoints already in circulation.

minimax h3 skip edges additionally keeps blocks 0, 1, 48 and 49 in BF16, matching the
_skip_edges builds on HF (+~1.5 GB on a 21 GB checkpoint).

Testing

10Eros Max H3 fl2va (BF16, 40 GB) quantized on a 5090 with both entries:

model_type quantized layers size core UNETLoader
minimax h3 200 21.0 GB loads
minimax h3 skip edges 184 22.5 GB loads

All comfy_quant payloads decode to {"format": "int8_tensorwise", "convrot": true, "convrot_groupsize": 256, "per_row": true}, and both files also still load through
OTUNetLoaderW8A8 with on-the-fly quantization off.

INT8ModelSave omitted "format" from comfy_quant, so comfy.ops could not
dispatch and core's UNETLoader failed with "Unknown quantization format"
on every checkpoint this node writes. Other int8 ConvRot checkpoints in
the wild carry {"format": "int8_tensorwise", "convrot": true, ...}.

Also adds MiniMax H3 exclusion lists (BobJohnson24#95): without an entry the list is
empty and adaln_proj (in_features 8), video_patch_proj (96) and
audio_patch_proj (32) get quantized with no rotation, since ConvRot needs
in_features % 256 == 0. The skip-edges variant additionally keeps the
first/last two transformer blocks in BF16.
patientx added a commit to patientx/ComfyUI-INT8-Fast-ROCM that referenced this pull request Aug 25, 2026
Added support for minimaxH3 

Credit: plz12345, upstream PR BobJohnson24#99
(BobJohnson24#99)
@patientx

patientx commented Aug 25, 2026

Copy link
Copy Markdown

merged this with my fork, credited you of course. thanks.

patientx@bc55937

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.

2 participants