Nodes/comfyui_gr85/Flux Model Merge Parameters
ComfyUI Node

Flux Model Merge Parameters

Stop hand-typing 60 block ratios

By veighnsche·Created 2 years ago·Updated 8 months ago· 1
Flux Model Merge Parameters
    • comma_separated_values
    • average_value
    • img_in
    • time_in
    • guidance_in
    • vector_in
    • txt_in
    • double_blocks_0
    • double_blocks_1
    • double_blocks_2
    • double_blocks_3
    • double_blocks_4
    • double_blocks_5
    • double_blocks_6
    • double_blocks_7
    • double_blocks_8
    • double_blocks_9
    • double_blocks_10
    • double_blocks_11
    • double_blocks_12
    • double_blocks_13
    • double_blocks_14
    • double_blocks_15
    • double_blocks_16
    • double_blocks_17
    • double_blocks_18
    • single_blocks_0
    • single_blocks_1
    • single_blocks_2
    • single_blocks_3
    • single_blocks_4
    • single_blocks_5
    • single_blocks_6
    • single_blocks_7
    • single_blocks_8
    • single_blocks_9
    • single_blocks_10
    • single_blocks_11
    • single_blocks_12
    • single_blocks_13
    • single_blocks_14
    • single_blocks_15
    • single_blocks_16
    • single_blocks_17
    • single_blocks_18
    • single_blocks_19
    • single_blocks_20
    • single_blocks_21
    • single_blocks_22
    • single_blocks_23
    • single_blocks_24
    • single_blocks_25
    • single_blocks_26
    • single_blocks_27
    • single_blocks_28
    • single_blocks_29
    • single_blocks_30
    • single_blocks_31
    • single_blocks_32
    • single_blocks_33
    • single_blocks_34
    • single_blocks_35
    • single_blocks_36
    • single_blocks_37
    • final_layer
    seed0
    bias0.50
    use_biasfalse
    max_percentage_change0.10
    only_blocksfalse
    default_float0.00
    only_0_and_1false
    enable_shuffletrue
    debugfalse
    values

    If you've ever opened ComfyUI's block-weighted Flux merge node and stared down a wall of sliders - one per transformer block, roughly sixty of them - you already know why this node exists. Flux's DiT isn't a single blob you can lerp with one ratio; ComfyUI's merge node wants a separate weight for img_in, time_in, guidance_in, vector_in, txt_in, all 19 double_blocks, all 38 single_blocks, and final_layer. Typing that by hand, or worse, tweaking it by hand to explore what a merge feels like, is miserable. GR85's Flux Model Merge Parameters doesn't do the merge - it generates the numbers you feed into the block-weighted merge node.

    Look at its outputs and this becomes obvious: img_in, time_in, guidance_in, vector_in, txt_in, double_blocks_0 through double_blocks_18, single_blocks_0 through single_blocks_37, final_layer - same names, same count, as the block-weighted merge node's inputs. Wire this node's outputs into that node's matching inputs and every block ratio gets filled in for you, generated rather than typed.

    How it decides the numbers. seed drives a reproducible RNG so you can get the same "random" merge twice. bias and use_bias skew the distribution toward one side - instead of a flat spread centered on 0.5, you push it toward favoring one model over the other. max_percentage_change caps how far any single block can drift from default_float, so you get controlled variance instead of wild extremes that blow up the merge. enable_shuffle (on by default) shuffles which value lands on which block, so you're not always applying the same treatment to the same low-numbered blocks. only_blocks restricts randomization to the actual transformer blocks and leaves the stem layers (img_in, txt_in, etc.) untouched. only_0_and_1 is the blunt version - forces every block to a hard binary choice instead of a continuous ratio, useful if you want to test "block on / block off" merges rather than fine gradients. The optional values field lets you paste in your own comma-separated starting values instead of letting it generate from scratch.

    Two outputs are worth calling out beyond the per-block floats: comma_separated_values bundles every block ratio into one string - handy for logging a merge recipe you liked so you can reproduce it later - and average_value gives you a single number summarizing how far the whole merge leans toward one model, useful as a quick sanity check before you commit to a long merge-and-test cycle.

    Installing it. Search "comfyui_gr85" in ComfyUI Manager, or from a terminal:

    cd ComfyUI/custom_nodes
    git clone https://github.com/veighnsche/comfyui_gr85
    

    Restart ComfyUI. The pack ships as pure Python with no extra model downloads or heavy dependencies - this particular node just does arithmetic, so there's nothing to fetch.

    Where people get tripped up. This node produces numbers, it doesn't touch weights - if your merged model comes out identical to one of the inputs, you've almost certainly forgotten to actually wire the outputs into your merge node's matching block inputs rather than leaving them dangling. And because there are ~65 outputs, it's easy to miswire one or two under a mismatched name; double-check that double_blocks_18 on this node lands on double_blocks_18 on the merge node and not double_blocks_19 (there is no 19th - Flux has 19 double blocks, indexed 0–18). If you're chasing a specific look rather than exploring randomly, start with enable_shuffle off and a low max_percentage_change so the merge stays close to your baseline model and you can nudge it in small, legible steps.

    CategoryGR85/Utils

    Inputs (10)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000
    biasFLOAT0.500–1
    use_biasBOOLEANfalse
    max_percentage_changeFLOAT0.100.01–0.5
    only_blocksBOOLEANfalse
    default_floatFLOAT0.000–1
    only_0_and_1BOOLEANfalse
    enable_shuffleBOOLEANtrue
    debugBOOLEANfalse
    valuesoptSTRING

    Outputs (65)

    NameTypeDescription
    comma_separated_valuesSTRING
    average_valueFLOAT
    img_inFLOAT
    time_inFLOAT
    guidance_inFLOAT
    vector_inFLOAT
    txt_inFLOAT
    double_blocks_0FLOAT
    double_blocks_1FLOAT
    double_blocks_2FLOAT
    double_blocks_3FLOAT
    double_blocks_4FLOAT
    double_blocks_5FLOAT
    double_blocks_6FLOAT
    double_blocks_7FLOAT
    double_blocks_8FLOAT
    double_blocks_9FLOAT
    double_blocks_10FLOAT
    double_blocks_11FLOAT
    double_blocks_12FLOAT
    double_blocks_13FLOAT
    double_blocks_14FLOAT
    double_blocks_15FLOAT
    double_blocks_16FLOAT
    double_blocks_17FLOAT
    double_blocks_18FLOAT
    single_blocks_0FLOAT
    single_blocks_1FLOAT
    single_blocks_2FLOAT
    single_blocks_3FLOAT
    single_blocks_4FLOAT
    single_blocks_5FLOAT
    single_blocks_6FLOAT
    single_blocks_7FLOAT
    single_blocks_8FLOAT
    single_blocks_9FLOAT
    single_blocks_10FLOAT
    single_blocks_11FLOAT
    single_blocks_12FLOAT
    single_blocks_13FLOAT
    single_blocks_14FLOAT
    single_blocks_15FLOAT
    single_blocks_16FLOAT
    single_blocks_17FLOAT
    single_blocks_18FLOAT
    single_blocks_19FLOAT
    single_blocks_20FLOAT
    single_blocks_21FLOAT
    single_blocks_22FLOAT
    single_blocks_23FLOAT
    single_blocks_24FLOAT
    single_blocks_25FLOAT
    single_blocks_26FLOAT
    single_blocks_27FLOAT
    single_blocks_28FLOAT
    single_blocks_29FLOAT
    single_blocks_30FLOAT
    single_blocks_31FLOAT
    single_blocks_32FLOAT
    single_blocks_33FLOAT
    single_blocks_34FLOAT
    single_blocks_35FLOAT
    single_blocks_36FLOAT
    single_blocks_37FLOAT
    final_layerFLOAT