Nodes/ComfyUI-LZNodes/LZ Merge Recipe Random Advanced
ComfyUI Node

LZ Merge Recipe Random Advanced

Pick the range and the step

By liz-ils·Created 7 months ago·Updated 12 days ago· 1
LZ Merge Recipe Random Advanced
    • recipe
    min_value0.00
    max_value1.00
    step_size0.10

    The plain LZMergeRecipeRandom rolls every weight between 0.1 and 1.0, no questions asked. LZ Merge Recipe Random Advanced is the same idea with three dials of control: min_value, max_value, and step_size. Want every block between 0.3 and 0.8 on a 0.05 grid so you stay in sane territory? This node does that. Want chaos from 0 to 1 in coarse steps? It does that too. Randomness you can aim.

    How it works

    Three FLOAT inputs define the sampling space:

    • min_value / max_value - the range each of the 19 block weights is drawn from (both default 0→1).
    • step_size - the grid the values snap to (default 0.1, down to 0.01).

    It builds the list of possible values within [min, max] on the step grid, draws 19 of them uniformly at random, and formats the result with precision matching the step (two decimals for fine steps, one for coarse). Output is the same single recipe STRING in merge order: IN00–IN08, M00, OUT00–OUT08. There's input validation worth knowing: if min_value >= max_value it silently resets the range to 0→1, and a non-positive step resets to 0.1 - it refuses to produce nonsense, but it also won't tell you it corrected you.

    Why the guardrails matter

    Fully random recipes (the plain node) skew aggressive - every block sampled from 0.1–1.0 means most blocks land well away from 0.5, so the merge is dominated by whichever parent happens to win the coin flips. Nudging the range toward, say, 0.35–0.65 keeps you in interpolation territory where the merge behaves like a reasonable blend with a few wildcard blocks. That's the real use: constrained exploration that can't run off a cliff, or - with a tight range and fine step - a way to re-roll subtle variations around a recipe you already like.

    It also inherits the usual merge-recipe caveats: it emits a string, not a merge; the recipe is specific to the two (or more) checkpoints you're blending; and "same range, different seed" still gives you a different merge each run, so log the recipe string with the result or you'll never find the good one again.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/liz-ils/ComfyUI-LZNodes
    

    restart → MyCustomNodes/Merge. ComfyUI Manager: ComfyUI-LZNodes. No extra dependencies - pure Python.

    The honest take

    Of the three merge nodes, this is the one I'd actually keep on canvas. Manual gives you full control but demands you know what you want; the plain random is a coin flip; this one splits the difference - you constrain the space and let luck fill in the blocks. The silent input-reset is the only real gotcha (a mistyped min_value > max_value doesn't error, it just resets), so eyeball your range before you trust the output.

    If you're new to merging, one loop to try: pick a parent pair, run this with 0.35–0.65 at 0.1, merge the recipe, and compare against a plain 0.5 blend. It's the fastest education in what block weighting actually does to a checkpoint.

    CategoryMyCustomNodes/Merge

    Inputs (3)

    NameTypeDefaultDescription
    min_valueFLOAT0.000–1
    max_valueFLOAT1.000–1
    step_sizeFLOAT0.100.01–1

    Outputs (1)

    NameTypeDescription
    recipeSTRING