Subtract Recipe List
Turn a pile of models into deltas in one step
- base_recipe
- recipe_0
- recipe_1
- recipe_2
- recipe_3
- recipe_4
- recipe_5
- recipe_6
- recipe_7
- recipe_8
- recipe_9
- recipe_10
- recipe_11
- recipe_12
- recipe_13
- recipe_14
- recipe_15
- recipe_16
- recipe_17
- recipe_18
- recipe_19
- recipe_20
- recipe_21
- recipe_22
- recipe_23
- recipe_24
- recipe_25
- recipe_26
- recipe_27
- recipe_28
- recipe_29
- recipe_30
- recipe_31
- recipe_32
- recipe_33
- recipe_34
- recipe_35
- recipe_36
- recipe_37
- recipe_38
- recipe_39
- recipe_40
- recipe_41
- recipe_42
- recipe_43
- recipe_44
- recipe_45
- recipe_46
- recipe_47
- recipe_48
- recipe_49
- recipe_50
- recipe_51
- recipe_52
- recipe_53
- recipe_54
- recipe_55
- recipe_56
- recipe_57
- recipe_58
- recipe_59
- recipe_60
- recipe_61
- recipe_62
- recipe_63
- recipes
The Subtract Recipe List (class Mecha Subtract Recipe List) is the version of the pack's Mecha Recipe List that actually does the math for you. Where the plain list node just bundles recipes together, this one takes a base_recipe and subtracts it from every recipe you feed in - so what comes out the other side is a list of deltas, all measured from the same base.
If you've done any serious merging, you know the drill: "fine-tune A minus base, fine-tune B minus base, then combine the deltas." This node is that setup minus the repetitive plumbing.
How it works
Mecha keeps two merge spaces straight: weights (full checkpoints, meaning "the actual model") and deltas (the difference between a model and something else). Subtracting a base from a model is the canonical way to get a delta - it's what add_difference style merges consume. Under the hood this node does exactly what Mecha Recipe List does, but for each recipe_i it computes recipe_i.node - base_recipe.node, so you never wire up the same subtraction graph over and over.
The inputs that matter:
- count (
INT, default 2, 0–64) - how many of the recipe slots actually get collected into the output list. Bump this to match how many deltas you're building. - base_recipe (
MECHA_RECIPE, required) - the common model every other input is measured against. - recipe_0 … recipe_63 (
MECHA_RECIPE, optional) - the models to subtract the base from. Fill only as many ascount. - recipes (
MECHA_RECIPE_LIST, output) - the resulting list of deltas, in the same order.
That output is a MECHA_RECIPE_LIST, which is the input type for every "n-way" merge method in the pack - Add Difference Ties, N Average, Model Stock, and friends. So a typical chain is: base + four fine-tunes → Subtract Recipe List → a TIES/DARE node → add the base back → Mecha Merger.
Install
Same pack, same install as everything else here. ComfyUI Manager → search "mecha" → install Mecha Merge Node Pack - or:
cd ComfyUI/custom_nodes
git clone https://github.com/ljleb/comfy-mecha.git
pip install -r comfy-mecha/requirements.txt
Restart, and the node shows up under mecha. The pack's only dependency is sd-mecha==1.1.7; no model files are downloaded by the pack itself.
Common issues
countis the master switch. Setcountto 3 but only wirerecipe_0andrecipe_1, and you get a two-element list, not an error. Set it to 4 with only three wired and same thing. It's a convenience, but it can bite you when you expect "n" and get "n-1."- The output is a list of deltas, not models. Whatever consumes this list is expected to work in delta space. If a downstream node complains about merge space, you've plugged a delta into a weight input (or vice versa) - the validation error usually spells this out, and the fix is to re-add the base somewhere down the chain.
- All recipes should be compatible with the base. If you subtract a base that doesn't share keys with one of the inputs, sd-mecha will let you know the recipe can't be built. Use models from the same family.
If your workflow is "one base, several experiments, all measured against it," this is the node that keeps the graph small enough to actually see what you're doing.
Inputs (66)
| Name | Type | Default | Description |
|---|---|---|---|
| count | INT | 20–64 | — |
| base_recipe | MECHA_RECIPE | — | |
| recipe_0opt | MECHA_RECIPE | — | |
| recipe_1opt | MECHA_RECIPE | — | |
| recipe_2opt | MECHA_RECIPE | — | |
| recipe_3opt | MECHA_RECIPE | — | |
| recipe_4opt | MECHA_RECIPE | — | |
| recipe_5opt | MECHA_RECIPE | — | |
| recipe_6opt | MECHA_RECIPE | — | |
| recipe_7opt | MECHA_RECIPE | — | |
| recipe_8opt | MECHA_RECIPE | — | |
| recipe_9opt | MECHA_RECIPE | — | |
| recipe_10opt | MECHA_RECIPE | — | |
| recipe_11opt | MECHA_RECIPE | — | |
| recipe_12opt | MECHA_RECIPE | — | |
| recipe_13opt | MECHA_RECIPE | — | |
| recipe_14opt | MECHA_RECIPE | — | |
| recipe_15opt | MECHA_RECIPE | — | |
| recipe_16opt | MECHA_RECIPE | — | |
| recipe_17opt | MECHA_RECIPE | — | |
| recipe_18opt | MECHA_RECIPE | — | |
| recipe_19opt | MECHA_RECIPE | — | |
| recipe_20opt | MECHA_RECIPE | — | |
| recipe_21opt | MECHA_RECIPE | — | |
| recipe_22opt | MECHA_RECIPE | — | |
| recipe_23opt | MECHA_RECIPE | — | |
| recipe_24opt | MECHA_RECIPE | — | |
| recipe_25opt | MECHA_RECIPE | — | |
| recipe_26opt | MECHA_RECIPE | — | |
| recipe_27opt | MECHA_RECIPE | — | |
| recipe_28opt | MECHA_RECIPE | — | |
| recipe_29opt | MECHA_RECIPE | — | |
| recipe_30opt | MECHA_RECIPE | — | |
| recipe_31opt | MECHA_RECIPE | — | |
| recipe_32opt | MECHA_RECIPE | — | |
| recipe_33opt | MECHA_RECIPE | — | |
| recipe_34opt | MECHA_RECIPE | — | |
| recipe_35opt | MECHA_RECIPE | — | |
| recipe_36opt | MECHA_RECIPE | — | |
| recipe_37opt | MECHA_RECIPE | — | |
| recipe_38opt | MECHA_RECIPE | — | |
| recipe_39opt | MECHA_RECIPE | — | |
| recipe_40opt | MECHA_RECIPE | — | |
| recipe_41opt | MECHA_RECIPE | — | |
| recipe_42opt | MECHA_RECIPE | — | |
| recipe_43opt | MECHA_RECIPE | — | |
| recipe_44opt | MECHA_RECIPE | — | |
| recipe_45opt | MECHA_RECIPE | — | |
| recipe_46opt | MECHA_RECIPE | — | |
| recipe_47opt | MECHA_RECIPE | — | |
| recipe_48opt | MECHA_RECIPE | — | |
| recipe_49opt | MECHA_RECIPE | — | |
| recipe_50opt | MECHA_RECIPE | — | |
| recipe_51opt | MECHA_RECIPE | — | |
| recipe_52opt | MECHA_RECIPE | — | |
| recipe_53opt | MECHA_RECIPE | — | |
| recipe_54opt | MECHA_RECIPE | — | |
| recipe_55opt | MECHA_RECIPE | — | |
| recipe_56opt | MECHA_RECIPE | — | |
| recipe_57opt | MECHA_RECIPE | — | |
| recipe_58opt | MECHA_RECIPE | — | |
| recipe_59opt | MECHA_RECIPE | — | |
| recipe_60opt | MECHA_RECIPE | — | |
| recipe_61opt | MECHA_RECIPE | — | |
| recipe_62opt | MECHA_RECIPE | — | |
| recipe_63opt | MECHA_RECIPE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| recipes | MECHA_RECIPE_LIST | — |