Nodes/MiniMaxRefDirector-ComfyUI/MiniMax Ref Hybrid Loader
ComfyUI Node

MiniMax Ref Hybrid Loader

Steal the good parts of fl2va for ref2va

By eaglering·Created 19 days ago·Updated about 10 hours ago· 23
MiniMax Ref Hybrid Loader
    • model
    base_model
    overlay_model
    overlay_presetblock_range_adaln
    block_range_start25
    block_range_end49
    final_adaln_from_overlayfalse
    custom_overlays
    custom_base
    weight_dtypedefault

    Here's the situation the H3 local scene keeps running into: one checkpoint, the fl2va lineage, generates noticeably nicer output. Another, ref2va, is the one with the proper reference-conditioning pathway - the one that actually follows your reference image, video, and audio. You want fl2va's quality and ref2va's references, and MiniMaxRefHybridLoader is the blunt instrument for getting both: it loads one checkpoint as the base and surgically overlays selected tensor groups from a second one on top.

    The mechanism is honest about what it's doing. MiniMax H3's DiT is 50 blocks (indexed 0..49), and the loader only bothers touching the adaln_proj tensors - the adaptive-layer-norm projection weights that, in a reference-conditioning model, are exactly where the "condition this block on what it sees" signal lives. So the default preset, ref2va_adaln_over_fl2va, runs a fl2va base and pulls each block's adaln_proj from ref2va: quality from one, reference-following from the other. That's the whole pitch, and for a reference-to-video workflow it's a genuinely useful trick rather than a gimmick.

    The three required inputs are checkpoints, checkpoints, and intent. base_model is where every tensor starts; overlay_model is where the preset-matched tensors come from (you can set it equal to base, which is just "load base only"). overlay_preset is the real control:

    • none - pure base load, equivalent to the stock Load Diffusion Model node
    • ref2va_adaln_over_fl2va (default) - per-block adaln_proj from the overlay
    • ref2va_all_adaln_over_fl2va - also takes final_layer.adaln_proj
    • ref2va_full_over_fl2va / fl2va_full_over_ref2va - everything from the overlay, which the tooltip calls out as a sanity check rather than a use case
    • block_range_adaln - only blocks in [block_range_start, block_range_end], for when you want to experiment with where the reference conditioning lives
    • custom - you hand-write the tensor selection

    Both checkpoints must live in ComfyUI/models/diffusion_models. The custom tier is where this gets deep: custom_overlays and custom_base take comma-separated keys, prefixes, or globs - blocks.49. for a prefix, blocks.[0-4].*.attn.qkv_proj.weight as a glob - to force tensors over from the overlay or drag them back to the base. final_adaln_from_overlay is a boolean additive toggle for pulling final_layer.adaln_proj regardless of preset. Unless you have a specific hypothesis about a block range, the default preset plus maybe that final-adaln toggle is where you'll live.

    weight_dtype mirrors the stock loader (default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2) - leave it unless you know why you're touching it. Output is a single model, wired into your sampler chain. It's categorized under model/loaders and is the one node in this pack that's independently useful outside the director workflow.

    Be honest about what this is: a checkpoint-merging experiment, not a scientific guarantee. There's a companion analysis file in the repo describing what differs between fl2va and ref2va, but the "best" blend is empirical - log what you load (the node prints the combo to the console), render the same shot under a couple of presets, and keep the one that wins. Installation is the pack's shared story: ComfyUI Manager or clone https://github.com/eaglering/MiniMaxRefDirector-ComfyUI into custom_nodes, pip install -r requirements.txt, restart. And a reminder that H3's local weights sit under a community licence that excludes the US, EU, UK, and Korea - worth knowing before you download a second ~42 GB checkpoint to merge.

    Categorymodel/loaders

    Inputs (9)

    NameTypeDefaultDescription
    base_modelCOMBOPrimary checkpoint -- every tensor starts here.
    overlay_modelCOMBOSecondary checkpoint -- tensors matched by overlay_preset come from here. May equal base_model (effectively loads base only).
    overlay_presetCOMBOblock_range_adalnWhich tensor groups to take from overlay_model. 'none' = pure base loading (equivalent to stock UNETLoader). 'ref2va_adaln_over_fl2va' (default) = take per-block adaln_proj from the overlay only. 'ref2va_all_adaln_over_fl2va' = also take final_layer.adaln_proj. 'ref2va_full_over_fl2va'/'fl2va_full_over_ref2va' = take everything from the overlay (sanity check). 'block_range_adaln' = take adaln_proj only for blocks in [block_range_start, block_range_end] (inclusive). 'custom' = use custom_overlays only.
    block_range_startoptINT250–49Only used when overlay_preset == 'block_range_adaln'. Lower-inclusive bound on the block index whose adaln_proj comes from overlay_model. The minimax h3 DiT has 50 blocks indexed 0..49.
    block_range_endoptINT490–49Only used when overlay_preset == 'block_range_adaln'. Upper-inclusive bound on the block index. Set block_range_end < block_range_start to take NO blocks from the overlay (effectively pure base).
    final_adaln_from_overlayoptBOOLEANfalseToggle overlay of final_layer.adaln_proj.linear.{weight,bias} from overlay_model. Additive on top of any preset: - False (default): leave final_layer.adaln on the base (unless a preset already covers it, e.g. ref2va_all_adaln_over_fl2va). - True: pull final_layer.adaln from the overlay in addition to whatever the preset does.
    custom_overlaysoptSTRINGComma-separated keys/prefixes/globs to *also* take from the overlay on top of the preset. E.g. 'blocks.49.,final_layer.video_out.'. Bare prefixes ending in '.' match by prefix; other strings are matched as fnmatch globs (e.g. 'blocks.[0-4].*.attn.qkv_proj.weight').
    custom_baseoptSTRINGComma-separated keys/prefixes/globs that should be forced *back* to the base even if the preset or custom_overlays would take them from the overlay. Useful for keeping e.g. final_layer.adaln_proj on the base while everything else adaln comes from the overlay.
    weight_dtypeoptCOMBOdefaultSame meaning as the stock 'Load Diffusion Model' node. Leave 'default' unless you know what you are doing.

    Outputs (1)

    NameTypeDescription
    modelMODEL