ComfyUI_MinimaxH3HybridLoader README

The project's README from github.com/scottmudge/ComfyUI_MinimaxH3HybridLoader. As one markdown file: README.md.

ComfyUI MiniMax H3 Hybrid Loader

A custom ComfyUI node that loads a MiniMax H3 (audio+video DiT) checkpoint by merging selected tensor groups from a second "overlay" checkpoint onto a "base" checkpoint, then hands the merged state dict to ComfyUI's stock load_diffusion_model_state_dict. The result is indistinguishable from a model loaded by Load Diffusion Model — same detection, same patcher, same multigpu deepclone support.

Why

Minimax shipped two MiniMax H3 checkpoints with identical weight layout:

A tensor-by-tensor comparison (see minimax_h3_analysis.md) shows >97% of the weights (attention QKV/O, MLPs, RMSNorms, patch projections, rope, token refiner) are bit-identical or cosine ≥ 0.9997 between the two. The only sub-component that differs meaningfully is the per-block adaln_proj.linear.* weights — the AdaLN modulation projections that route text / audio / video / reference modality tags through the residual stream — plus the final_layer.adaln_proj.linear.* weight (the single most discordant tensor in the model) and, to a lesser degree, the video_out / audio_out output heads.

So a promising hybrid is: load fl2va as the base (high-quality attention, MLPs, and output heads), and overlay only the per-block adaln_proj weights from ref2va (preserving the reference-conditioning pathway). This node exposes that configuration as its default preset, plus several coarser / finer presets and an explicit custom glob string so you can experiment.

good_settings

After testing this is what I, subjectively, think is the best in terms of reference capability and visual/audio quality:

All other settings default

Features

Presets

Preset What it does
none Pure base loading (equivalent to stock UNETLoader).
ref2va_adaln_over_fl2va Take per-block adaln_proj.linear.* from the overlay only. The recommended hybrid.
ref2va_all_adaln_over_fl2va Also take final_layer.adaln_proj from the overlay. "Max-reference, accept-quality-loss" knob.
ref2va_full_over_fl2va / fl2va_full_over_ref2va Take everything from the overlay (sanity checks).
block_range_adaln (default) Take adaln_proj only for blocks in [block_range_start, block_range_end] (inclusive, 0..49).
custom Use custom_overlays / custom_base only.

Optional inputs

Installation

Drop this repository into ComfyUI/custom_nodes/ and restart ComfyUI. The node appears under the model/loaders category as MiniMax H3 Hybrid Loader.

Further reading

The full per-tensor comparison of ref2va vs fl2va, including per-block trends and the rationale for each suggested hybrid configuration, is in minimax_h3_analysis.md.

ComfyUI_MinimaxH3HybridLoader (scottmudge/ComfyUI_MinimaxH3HybridLoader)

Searching Database…

这是什么?一个自定义 ComfyUI 节点,通过把第二个“叠加”检查点中选定的张量组合并到“基础”检查点上,来加载 MiniMax H3(音频+视频 DiT)检查点,生成的混合模型会被 ComfyUI 完全当作普通加载的模型对待。
这是独立应用,还是接入到其他东西里的插件?它是 ComfyUI 的自定义节点(插件),不是独立程序——它在 ComfyUI 的 model/loaders 类别中添加一个新的加载器节点。
使用它需要特定的检查点吗?需要——你需要 MiniMax H3 的 fl2va 和 ref2va 两个 safetensors 检查点,因为该节点专门在这两个模型之间合并张量组。
加载两个检查点会让内存占用翻倍吗?不会——两个 safetensors 文件都以 mmap 支持并逐张量流式读取,因此峰值内存保持在约一个模型的水平(int8 检查点约 19.5GB),与自带加载器相同。
推荐的混合配置是什么?用 fl2va 作为基础,只叠加 ref2va 中第 25 到 49 块的逐块 AdaLN 调制权重——作者发现这样能在输出质量与保留参考条件化能力之间取得平衡。
“none”预设是做什么的?它执行纯粹的基础检查点加载,等同于 ComfyUI 自带的 UNETLoader,不从叠加检查点取任何东西。
使用它会修改我原来的检查点文件吗?不会,两个 safetensors 文件都以只读方式打开,从不在磁盘上被写入或更改。
这两个 MiniMax 检查点究竟为什么需要混合?fl2va 和 ref2va 有超过 97% 的权重完全相同,但 fl2va 的输出质量更高,而 ref2va 虽然增加了多模态参考条件化,却存在已知的训练质量问题——混合让你保留 fl2va 的质量,同时找回 ref2va 的参考能力。
Creator
scottmudge
Size
0.1 MB
Stars
181
Updated
CommitAug 11
Age
2mo
Commits · 90 Days