Nodes/SP-Nodes/GodnessMerger_InputBlocks
ComfyUI Node

GodnessMerger_InputBlocks

Set, or randomize, one block group's merge ratio

By bananasss00·Created 2 years ago·Updated 5 days ago· 20
GodnessMerger_InputBlocks
    • GM_INPUT_BLOCKS
    seed0
    min0.0
    max1.0
    type
    custom_value1.00

    This is a companion config node for GodnessMerger_Apply - it doesn't merge anything by itself, it just decides the merge ratio for one specific part of a UNet: the input_blocks group. Wire its output into GodnessMerger_Apply's input_blocks slot and that block group stops following the merge's global strength and starts following whatever this node produces instead.

    How it works

    This is where the "controlled randomization" from the README actually happens. type picks between two modes: custom uses a fixed value you set directly (custom_value, 0–1), while random rolls a value somewhere inside your min/max bounds (also 0–1), using seed to make that roll deterministic. That last part is the whole point - a random ratio you can't reproduce is just noise, but a random ratio pinned to a seed means you can roll a batch of merges, pick the one you like, and get back to that exact input_blocks ratio later just by reusing the same seed.

    The inputs and outputs that matter

    • type - custom or random. This decides which of the other fields actually matter.
    • custom_value (0–1, default 1) - used only when type is custom.
    • min / max (0–1) - the bounds for the random roll, used only when type is random.
    • seed - makes the random roll reproducible.
    • Output: GM_INPUT_BLOCKS - a single-purpose custom type that only wires into GodnessMerger_Apply's input_blocks input.

    input_blocks is one of six block groups a full UNet merge cares about - alongside time_embed, label_emb, middle_block, output_blocks, and out. This node only controls the one. If you want independent control over every part of the network, you'd wire up a version of this node (or its Experimental sibling) for each group; if input_blocks is the only piece you want to treat specially, this is the only extra node you need.

    How to install it

    Through ComfyUI Manager: search "SP-Nodes," install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bananasss00/ComfyUI-SP-Nodes
    

    Restart ComfyUI afterward.

    Common issues

    The easiest mistake here is setting the wrong fields for the type you've actually chosen - type: custom silently ignores min, max, and seed, and type: random silently ignores custom_value. There's no error for having the "wrong" fields populated, it just quietly does nothing with them, so if changing a value doesn't seem to affect your merge at all, check that type actually matches which fields you're trying to use before assuming something's broken.

    CategorySP-Nodes/model_merging

    Inputs (5)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000
    minFLOAT0.00–1
    maxFLOAT1.00–1
    typeCOMBO2 options: custom, random
    custom_valueFLOAT1.000–1

    Outputs (1)

    NameTypeDescription
    GM_INPUT_BLOCKSGM_INPUT_BLOCKS