[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94809":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},94809,"ComfyUI_MinimaxH3HybridLoader","scottmudge\u002FComfyUI_MinimaxH3HybridLoader","scottmudge","A model hybridization loader to combine different layers\u002Fblocks of the fl2va and ref2va models",null,"Python",122,6,102,0,4,10,45.54,"MIT License",false,"master",true,[],"2026-08-24 04:01:22","# ComfyUI MiniMax H3 Hybrid Loader\n\nA 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.\n\n## Why\n\nMinimax shipped two MiniMax H3 checkpoints with identical weight layout:\n\n- **`minimax_h3_fl2va`** — trained on first\u002Flast-keyframe conditioning only; Minimax reports noticeably higher output quality.\n- **`minimax_h3_ref2va`** — additionally trained on multimodal reference conditioning (image \u002F video \u002F audio references), but a confirmed training-quality issue makes its raw output worse.\n\nA tensor-by-tensor comparison (see [`minimax_h3_analysis.md`](.\u002Fminimax_h3_analysis.md)) shows **>97% of the weights** (attention QKV\u002FO, 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 \u002F audio \u002F video \u002F *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` \u002F `audio_out` output heads.\n\nSo 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 \u002F finer presets and an explicit custom glob string so you can experiment.\n\n## Recommended Settings for Higher Ref2VA Quality:\n\n\u003Cimg width=\"653\" height=\"337\" alt=\"good_settings\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fcef3dbc1-0424-435f-99c9-4a5ed8d337ca\" \u002F>\n\nAfter testing this is what I, subjectively, think is the best in terms of reference capability and visual\u002Faudio quality:\n\n* **fl2va** model as **base**\n* **ref2va** model as **overlay**\n* **block_range_adaln** overlay preset\n* **block_range_start** set to **25** (30 in screenshot, but 25 may be a better compromise between quality and reference retention)\n* **block_range_end** set to **49**\n  \nAll other settings default\n\n## Features\n\n- **Memory-friendly:** both safetensors files are opened mmap-backed and tensors are streamed one key at a time. Peak RSS is one model's worth (~19.5 GB for the int8 checkpoints), not 2× — the same as the stock loader.\n- **Read-only:** neither safetensors file is mutated on disk.\n- **Stock-compatible:** behaves exactly like `Load Diffusion Model` when `overlay_preset == \"none\"`.\n- **Quantization-aware:** int8 `.comfy_quant` siblings always co-travel with the weight they belong to.\n\n## Presets\n\n| Preset | What it does |\n|---|---|\n| `none` | Pure base loading (equivalent to stock `UNETLoader`). |\n| `ref2va_adaln_over_fl2va` | Take per-block `adaln_proj.linear.*` from the overlay only. The recommended hybrid. |\n| `ref2va_all_adaln_over_fl2va` | Also take `final_layer.adaln_proj` from the overlay. \"Max-reference, accept-quality-loss\" knob. |\n| `ref2va_full_over_fl2va` \u002F `fl2va_full_over_ref2va` | Take everything from the overlay (sanity checks). |\n| `block_range_adaln` *(default)* | Take `adaln_proj` only for blocks in `[block_range_start, block_range_end]` (inclusive, 0..49). |\n| `custom` | Use `custom_overlays` \u002F `custom_base` only. |\n\n## Optional inputs\n\n- **`block_range_start` \u002F `block_range_end`** — Only used with `block_range_adaln`. The MiniMax H3 DiT has 50 blocks indexed 0..49.\n- **`final_adaln_from_overlay`** — Additive toggle (independent of preset) to pull `final_layer.adaln_proj.linear.*` from the overlay on top of whatever the preset already does.\n- **`custom_overlays`** — Comma-separated keys \u002F prefixes \u002F globs to *also* take from the overlay on top of the preset. Bare prefixes ending in `.` match by prefix (e.g. `blocks.49.`); other strings are matched as fnmatch globs (e.g. `blocks.[0-4].*.attn.qkv_proj.weight`).\n- **`custom_base`** — Comma-separated keys \u002F prefixes \u002F globs to force *back* to the base even if the preset or `custom_overlays` would take them from the overlay.\n- **`weight_dtype`** — Same meaning as the stock `Load Diffusion Model` node (`default`, `fp8_e4m3fn`, `fp8_e4m3fn_fast`, `fp8_e5m2`).\n\n## Installation\n\nDrop this repository into `ComfyUI\u002Fcustom_nodes\u002F` and restart ComfyUI. The node appears under the **model\u002Floaders** category as **MiniMax H3 Hybrid Loader**.\n\n## Further reading\n\nThe 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`](.\u002Fminimax_h3_analysis.md).\n","这是一个专为ComfyUI设计的MiniMax H3多模态扩散模型混合加载器，支持将fl2va（高质量首尾帧条件）与ref2va（支持参考图像\u002F音视频条件）两个检查点的指定权重层进行细粒度融合。核心功能是按Tensor组（如adaln_proj、output heads等）选择性覆盖，仅加载差异部分，内存占用与原生加载器相当（约19.5GB），且完全兼容ComfyUI标准模型加载流程与多GPU部署。适用于需要兼顾生成质量与多模态参考控制的AI音视频生成任务，如基于参考图的视频合成、音频驱动视频编辑等场景。",2,"2026-08-16 02:30:08","CREATED_QUERY"]