DOGMA v37 Conservative Blend
An alpha that decides itself, and never trusts a crop
- edited
- original
- image
- info
Almost every paste in ComfyUI is a slider you guess. This node removes the guess and replaces it with a rule: measure how different the edited tile is from the original, and let the difference pick the opacity.
The rule is a two-line piece of arithmetic. For each pair of tiles:
delta = mean(|edited - original|)
alpha = clamp(0.060 / delta, 0.18, max_alpha)
out = original * (1 - alpha) + edited * alpha
Read the top line as intent rather than maths. 0.060 / delta says: hold the amount of change roughly constant. A tile that differs hugely from the original gets a small alpha so you don't import all of it; a tile that barely differs gets a large one. The clamps are where the personality is - max_alpha (default 0.55) means even an identical tile is never pasted at more than 55%, and the 0.18 floor means even a wildly different tile still gets some of its detail. So the output is always somewhere between 18% and 55% edited. Never wholesale, never nothing.
That's a strange default for a pack whose stitch nodes will happily go to 100%. It makes sense once you know what it's for: this is the safety net for the case where you've sampled a batch of crops and you cannot inspect them all. It's the difference between a creative pass and a batch pass - one of those wants a dial, the other wants a policy.
The details that matter
It's list-shaped. edited and original are both list inputs (INPUT_IS_LIST=True), and the output is a list of images while the info string is a single string (OUTPUT_IS_LIST=(True, False)) - so if you wire it into something expecting a batch, expect a type complaint. It pairs edited[i] with original[min(i, len(original)-1)], so a shorter original list reuses its last entry rather than erroring. Convenient, and a good way to blend a whole tile batch against one master.
It resizes the original to match. If sizes differ, the original is bicubic-resampled to the edited tile's dimensions before the delta is computed. So a crop-edit-stitch loop where the edited tile came back at a different resolution still measures something meaningful.
The info line is per tile. 1:d=0.184/a=0.33 | 2:d=0.061/a=0.55 | ... - delta and the alpha chosen, tile by tile. That's the whole diagnostic. A tile sitting at the 0.18 floor is one the model rewrote hard; a tile pinned at max_alpha barely changed. Both are worth knowing before you look at the images.
Inputs and outputs
edited (IMAGE, list), original (IMAGE, list), max_alpha (FLOAT, default 0.55, 0–1, step 0.05), output image (IMAGE, list) plus info (STRING).
For a single image it works too - a one-element list is a list - but then you've paid for a policy you could have set by hand.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Or ComfyUI Manager → DOGMA Nodes, or comfy node install comfyui-dogma-nodes. No Python dependencies (requirements.txt is a comment line; pyproject.toml declares an empty list) and no models to download. It's a multiply and an add. MIT licensed.
Where people get burned
Nothing tells you the blend was applied. There's no noop flag, no pass-through marker in the output - the only evidence is the info string. If you skip it, you'll think your details landed when they were half-mixed into a source that had nothing to do with them.
max_alpha is not a strength dial. Raising it from 0.55 to 1.0 doesn't make the edit stronger; it just raises the ceiling for tiles that barely differ. Tiles with a real delta are governed by 0.060 / delta and stay low regardless. If you want the edit to win outright, this is the wrong node - use a stitch that respects a mask, and use the mask to say where the edit is allowed.
And the sibling is meaningfully different. DOGMAConservativeBlendV381 - displayed as "v39 Safe Conservative Blend" - adds a bail-out: if the edited tile is essentially black while the original isn't (a black frame or a failed VAE decode), or if the delta exceeds 0.24, it sets alpha to 0.0 and passes the original through untouched. On a batch run where you're not inspecting every tile, that's the one you want. On a run where you're checking the output, this one's per-tile info line is more legible.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| edited | IMAGE | — | |
| original | IMAGE | — | |
| max_alpha | FLOAT | 0.550–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| info | STRING | — |