DOGMA v43 Region-Safe Stitch
Feather everything, hide the seams
- base_image
- patches
- masks
- stitch
- image
- info
The whole "opaque" thing - hard mask core, patch replaces pixels 1:1 - works beautifully for cars and terribly for sky. A car has an outline; a region of road does not. Force a binary edge onto a surface repair and you get a visible cut where the generated texture stops, which is the classic "pasted patch" look.
DOGMARegionStitchV43 is the pack's answer, and it goes the other way entirely: no binary core at all. Its own comment says it plainly - "no binary core edge. Dilate then multi-pass feather so the edit fades continuously into the untouched source instead of exposing segmentation cuts."
How it works
Six inputs: base_image, patches, masks, stitch, category and kind. List-mode, so the three lists come straight from a region-crop node. Outputs are image and info.
The blend parameters are chosen from kind, and this is the only reason the node takes category too - it's reporting, and it canonicalises the string so info reads consistently:
- OBJECT - dilate the mask 6px, blur with a 55px kernel, then a second 21px pass, then scale the whole alpha by 0.96
- STRUCTURE - dilate 7, kernel 65, 21px second pass, strength 0.88
- SURFACE - dilate 9, kernel 81, 21px second pass, strength 0.72
The two-pass blur is the interesting part. Averaging a mask twice with a wide kernel gives you a smooth ramp rather than a box, and the dilation ensures the ramp starts outside the segmented region so the generated pixels reach full strength across their own boundary. Alpha is soft × strength, which is why nothing ever hits 100%: an object patch lands at 0.96, a sky repair at 0.72 - deliberately partial, because a surface re-render at full strength is how you get a blotchy sky with a sharp edge.
info gives you V53 soft feather stitch | cars [OBJECT] | 14 region(s) | no hard mask core.
When to use which
Two stitches ship in this neighbourhood of the pack and they're not interchangeable. Region-safe (this one) when the region's boundary is arbitrary - a surface, a structure, a region your inventory described rather than segmented - or when you can see segmentation cuts in the output. Opaque-core when the repair has to be the pixels, because a feathered paste can drag a half-repaired pixel back over a repaired one at 4% and that's fine for asphalt and mildly wrong for a brake light.
The overlap-avoidance argument matters too. Because every pixel near the mask edge is a blend of source and patch, two region stitches that touch each other will produce a soft double image in the band between them, not a hard overwrite. On dense scenes that's usually gentler than an opaque stitch's hard takeover.
Install
ComfyUI Manager → search DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI
No pip packages, no model files. The README covers only the WAN VACE and sampler nodes; the whole v43/v44/v50/v54 region family is code-only documentation, which is why reading info per run is the fast way to know what policy fired.
Gotchas
category and kind must be the same strings you fed the crops. They drive the blend policy, and they're canonicalised separately inside this node, so free text is tolerated - but a kind of SURFACE on a crop that was built as OBJECT gives you a wide soft blend on a hard-edged object, which reads as a blurry car.
Feathering at 0.72 can leave a faint ghost on high-contrast edges. That's the price of no hard core. If a lamp post or a window frame looks slightly doubled, that region wants the opaque-core stitch instead.
The masks must line up with the patches. Same contract as every stitch in this pack: parallel lists, absolute pixel coordinates from stitch, and a base_image at the resolution the crops were cut from.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | — | |
| patches | IMAGE | — | |
| masks | MASK | — | |
| stitch | DOGMA_STITCH | — | |
| category | STRING | — | |
| kind | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| info | STRING | — |