Nodes/LLS-node/LLS Simple Repair Finish
ComfyUI Node

LLS Simple Repair Finish

Pasting the repair back so nobody can see the seam

By Gin3601·Created 3 months ago·Updated 3 months ago· 0
LLS Simple Repair Finish
  • original_image
  • generated_image
  • repair_info
  • work_mask
  • final_image
  • preview_image
feather8.0
color_matchdisabled
brightness_matchenabled
blend_strength1.00
restore_unmasked_areatrue
edge_fixsoft
preview_modefinal
sample_info

Sampling the repaired region is only half the job. The other half - and the half that makes or breaks an inpaint - is putting the new pixels back into the original so no one can find the boundary. That's the entire job of LLS Simple Repair Finish: take your original image, take whatever the sampler produced, and composite them together using the same repair_info metadata that LLS Simple Repair Prepare wrote on the way in.

It's the mirror node to Prepare. Where Prepare decides where the work happens (region, crop, or canvas) and encodes it, Finish undoes that decision - it reads the recorded repair_scope out of repair_info and picks the right compositing path: paste a region in place, or re-stitch a cropped work area back onto the full canvas, or fold an expanded canvas back down.

How the seam disappears

Composite-by-mask is trivial - the trick is making it invisible, and that's what the middle three settings do:

  • feather (default 8) - softens the mask edge before blending. Raised it? Lower edge. This is your first seam control.
  • color_match (default disabled) - after compositing, re-map the repaired region's color statistics to match the surrounding original. Options are mean_std (match mean and standard deviation per channel) and histogram_simple. Turn it on the moment the repair comes back with a noticeably different tint - this is the classic "the patch is the right content but the wrong colour" failure.
  • brightness_match (default enabled) - the same idea for luminance only. Keep it on; it's cheap and fixes a huge fraction of "patch looks pasted" cases.
  • blend_strength (default 1.0) - how hard to apply the color/brightness matching. Dial it down if matching starts flattening the patch.
  • edge_fix (default soft) - extra edge softening pass after the main blend, with a strong option for stubborn seams.

And the setting that embodies the whole point of masked repair: restore_unmasked_area (default true). With it on, every pixel outside the mask comes straight from the original, untouched. This is the one thing a mask-based pipeline still owns over the 2026 instruction-edit models - no whole-frame re-encode, no drift on the pixels you didn't ask to change.

Inputs and outputs

Required: original_image, generated_image (the VAE-decoded latent from your sampler), and repair_info from Prepare. work_mask is optional - wire it if you want to force the composite mask instead of trusting the one stored in repair_info. sample_info is a free-form string you can ignore.

Outputs: final_image (the composited result - wire this to Save Image) and preview_image, whose behavior depends on preview_mode: final (just the result), compare (side-by-side), mask (see the composite mask), or before_after. Start on compare while tuning, flip to final when it's good.

Wiring it in

The README's minimal repair chain, in order:

LLS Simple Repair Prepare → LLS Simple KSampler → VAE Decode → LLS Simple Repair Finish → Preview / Save Image

original_image comes from the same Load Image that fed Prepare, and generated_image from the VAE Decode of the sampled latent. repair_info runs straight from Prepare to Finish.

Installing

ComfyUI Manager → search "LLS-node", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Gin3601/LLS-node

Restart and the node appears under LLS/Image Repair. No extra pip dependencies - the pack ships without a requirements.txt and uses only core ComfyUI (torch/numpy/PIL) plus spandrel for model loading, which ComfyUI already bundles.

Gotchas

  • Repair Finish assumes its partner. If repair_info didn't come from LLS Simple Repair Prepare, the node normalizes it defensively, but you're fighting the design. Use the pair.
  • Seam visible even with feather up? Check color_match - most "grey box / pasted patch" complaints trace back to a colour shift, not a geometry problem. That's a known inpainting failure mode in general, and this node gives you the direct fix.
  • restore_unmasked_area being on is what keeps the rest of the frame bit-identical. If you're deliberately doing a stylized pass where the whole image should change, turn it off - but know that you've left the "masked inpainting" playbook and are basically doing full img2img.
CategoryLLS/Image Repair

Inputs (12)

NameTypeDefaultDescription
original_imageIMAGE
generated_imageIMAGE
repair_infoLLS_REPAIR_INFO
featherFLOAT8.00–256
color_matchCOMBOdisabled3 options: disabled, mean_std, histogram_simple
brightness_matchCOMBOenabled2 options: disabled, enabled
blend_strengthFLOAT1.000–1
restore_unmasked_areaBOOLEANtrue
edge_fixCOMBOsoft3 options: none, soft, strong
preview_modeCOMBOfinal4 options: final, compare, mask, before_after
work_maskoptMASK
sample_infooptSTRING

Outputs (2)

NameTypeDescription
final_imageIMAGE
preview_imageIMAGE