DOGMA Local Result Gate v34 — Preserve Means Preserve
The one-line gate that throws away a bad local edit
- edited
- original
- image
- info
Two IMAGE inputs, a STRING, and a coin flip that always lands the same way. DOGMALocalResultGateV34 is the cheapest insurance in this pack and probably the node I'd add first if you only had room for one.
What it does
It looks at prompt. If that string starts with PRESERVE - which is exactly what the v34/v35/v36 local prompt nodes emit when there's nothing safe to repair - it ignores edited completely and passes original through instead. If the prompt says anything else, edited goes through and original is discarded.
Outputs are image (the crop that continues to the stitch) and info (one of two sentences telling you which branch fired).
That's the entire node. It's four lines of logic and it fixes a real problem.
The problem it fixes
Your VLM looked at a crop, found no defect, and your prompt node correctly produced a do-nothing prompt. But the local sampling pass doesn't care. It runs anyway - the crop still goes through the sampler, still round-trips through the VAE, and comes back with a subtly different image. Different noise floor, slightly different colour, sometimes a visible grey cast. Then your stitch composites that slightly-worse crop onto the base image, and you've made the picture measurably worse in a region that was fine.
Multiply that by fifteen groups in a batch and it's the reason "I ran the detailer and the result looks softer" is such a common complaint. The node is a guard against the half of the pipeline that doesn't know it was told to do nothing.
Wiring it
edited from the local pass's decode, original from the crop you fed that pass, prompt from the same prompt node that drove the pass. Then image continues to the stitch node and the sampler's output never touches anything else.
The important part is the prompt wire: this gate is only as good as the convention it reads. If you splice your own text node in between the prompt node and the gate, or wrap the prompt in a sentence of your own, PRESERVE stops being the first token and the gate never fires again. Silent, no error, just a gate that's off.
Inputs and outputs
edited, original, prompt in; image, info out. No options, nothing to set.
Install
ComfyUI Manager → search DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Restart. No Python dependencies and no model downloads - the whole pack is PyTorch plus ComfyUI's built-in sampler and model-management APIs.
v34 or v35?
There are two of these, and the honest answer is they're the same gate. Both check whether the prompt starts with PRESERVE and both return the original crop when it does. The only difference is the text of the info output - v34 says which crop it kept, v35 phrases the same thing slightly differently.
So: pick either, and if you're already on the v35 prompt nodes, take the v35 gate for a consistent read of your logs. If you want the gate to do more than a binary switch - capping how far an accepted edit can drift from the original - that's DOGMALocalSafetyGateV36, which is a different animal.
Where it bites
It's all-or-nothing by design, and the "all" side has no upper bound. A prompt that says anything other than PRESERVE lets the edit through untouched, however wild it is. That's why the safety gate exists as the next step up.
Second, this gate makes no attempt to compare the two images. It never looks at pixels. If your VLM is too optimistic and always finds "a defect", you'll never see the preserve branch, and the gate will look broken while it's doing exactly what it was told.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| edited | IMAGE | — | |
| original | IMAGE | — | |
| prompt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| info | STRING | — |