Composite Repaint Regions (Yogurt Nodes)
Sew the repainted crops back onto the base image, seams invisible
- base_image
- repainted_regions
- blend_masks
- region_info
- image
- alpha
The whole repaint-region pipeline exists so you can crop small areas, repaint them at full resolution, and put them back. This is the "put them back" node. Composite Repaint Regions takes your repainted crops, their blend masks, and the region metadata, and composites them onto the base image - with feathered edges so you can't see where the new pixels meet the old ones. It's the difference between a seamless fix and a patchwork of visible rectangles.
How it works
The node places each repainted crop back at its original coordinates (that's what the region_info from Mask Region Planner tells it) and uses the blend_masks from Crop Image By Regions to feather the transition. The base_image input is described as the "Original or VAE-roundtripped base image" - that phrasing matters, because it's your choice whether to composite onto the untouched original or onto a VAE-encoded/decoded version. If your repaint ran through a VAE cycle, matching the base through the same roundtrip keeps the color science consistent and avoids the seam artifacts the troubleshooting docs warn about - "many SD models aren't great for inpainting... VAE encoding/decoding lightens, darkens, saturates" even at 0% denoise. When you composite a VAE-roundtripped repaint onto a raw original, you can see the difference; roundtrip the base too and the seam disappears.
The alpha_normalize toggle controls how the blend weights are normalized during compositing. Leave it on unless you have a specific reason to fiddle - when blend regions overlap or the sum of weights isn't clean, normalizing keeps the composite from getting either too strong or full of holes.
Inputs
- base_image - the original (or VAE-roundtripped) image you're compositing onto.
- repainted_regions - the batch of repainted crops, in the same order the crops came out of Crop Image By Regions.
- blend_masks - the blend masks from Crop Image By Regions, defining the feathered edge for each crop.
- region_info - the DICT from Mask Region Planner, carrying each region's placement. This is what makes "put it back where it came from" possible.
- alpha_normalize - whether to normalize the composite alpha. Default true.
Outputs
- image - the composited result. This is your finished image: full size, repainted regions blended in.
- alpha - the composite alpha mask. Useful if you want to inspect where compositing happened, or pass the result forward for further masking.
Install
Standard Yogurt Nodes install. ComfyUI Manager → search "ComfyUI-YogurtNodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes && pip install -r requirements.txt
Then restart ComfyUI. No models to download.
Where people get burned
Order matters more than anything else here. The repainted_regions batch must be in the same order as the crops that produced the blend_masks and region_info - if you reorder, filter, or duplicate crops in the repaint stage, the composite puts the wrong pixels in the wrong places with the wrong edges, and it will not look like a bug you can reason about. Keep the region family's outputs in lockstep from planner to composite. Second, the base-image choice is where seams live: compositing a VAE-roundtripped repaint onto a raw original is the classic source of visible edges even with perfect blend masks. Match the base to the repaint's color pipeline. And third, small-region repaints can leave the blend feather larger than the region itself - if a tiny crop disappears or blooms into its neighbors, check your blend mask resolution relative to the crop, not just the strength settings.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | Original or VAE-roundtripped base image. | |
| repainted_regions | IMAGE | Repainted region image batch. | |
| blend_masks | MASK | Blend masks from Crop Image By Regions. | |
| region_info | DICT | Region info from Mask Region Planner. | |
| alpha_normalize | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| alpha | MASK | — |