LLS Simple Repair Prepare
The inpainting setup node that does the boring 80% for you
- image
- mask
- vae
- model
- positive
- negative
- latent
- work_image
- work_mask
- repair_info
- recommended_denoise
- positive
- negative
Core ComfyUI's answer to "mask this region and regenerate it" is a scattered pile of nodes: VAE encode, then latent set, then a mask-blur helper, then a separate inpaint node if your model supports it, then keeping the crop and paste logic straight yourself. LLS Simple Repair Prepare collapses the setup half of that into one node. You give it an image, a mask, and a VAE, and it hands you a ready-to-sample latent plus a pile of metadata - including a recommended denoise strength, which is the part that usually takes people three failed runs to dial in by hand.
What it actually does
Under the hood it's a four-step pipeline that the node hides from you:
- Mask prep. Your raw mask gets thresholded, grown (
mask_grow, default 24px), and blurred (mask_blur, default 8) so the repair zone has soft edges instead of a hard cut line. - Scope decision.
repair_scopepicks where the work happens:regionrepairs in place;cropcarves out a work area around the mask and renders it bigger for detail-hungry fixes;canvasexpands the canvas so you can outpaint beyond the original edges. - VAE encode. The working image gets encoded to a latent with the mask attached as a noise mask - the "keep the unmasked pixels fixed" bit that makes masked inpainting touch nothing outside the region.
- Metadata. It writes a
repair_infoobject (its ownLLS_REPAIR_INFOtype) describing everything it decided, so the matching Finish node can composite the result back correctly.
The optional model and positive/negative inputs are there so the node can be family-aware about how it prepares the latent and what it recommends - but the purest setup works without them.
Inputs you'll actually touch
Defaults are all auto or sensible, and for a first run you can genuinely leave almost everything. The ones worth knowing:
mask_grow(24) andmask_blur(8) - grow the selection a bit into surrounding pixels and soften the boundary. This is your seam-control dial before sampling even starts.repair_scope-cropis the one to reach for when the mask is small (an eye, a hand) and you want detail budget: it renders just that region bigger.canvasis outpainting.min_size/max_size- the box the work area gets fitted into (resize_mode=fitdefault).max_size1024 is the default because that's SDXL territory; lower it for SD 1.5, raise it for Flux-class models.expand_*andcanvas_fill- only relevant incanvasscope. That's the "grow the image and fill the new border with blurred edge pixels" path.
Outputs
latent feeds your sampler directly; repair_info must go to the matching Finish node; work_image / work_mask are the prepared crop-and-mask you can preview to see what the sampler is actually being asked to repair; recommended_denoise is a float you can wire straight into the sampler's denoise widget - with auto_recommend enabled the node computes it from the mask area and scope.
Wiring it in
The README's minimal chain, and it's worth building exactly once:
Load Image → (mask from Simple Mask Draw / Simple Mask Create)
→ LLS Simple Repair Prepare → LLS Simple KSampler → VAE Decode
→ LLS Simple Repair Finish → Preview Image
Installing
ComfyUI Manager → search "LLS-node", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Gin3601/LLS-node
Restart, then look under the LLS/Image Repair category. No requirements.txt - everything rides on core ComfyUI's torch/numpy/PIL.
Gotchas
vaeis required. The node raises[LLS] Missing VAEif you skip it. Use the VAE from your checkpoint loader or an explicit VAE node - and with Flux, that means the separateae.safetensors, since Flux checkpoints don't carry an embedded VAE.repair_kernelandtask_hintdefault toautoand quietly pick a backend for you (latent_mask,vae_inpaint, ornative_fill). That's a good thing - but if your results look wrong, checking which kernel it chose (it's in the JSON outputs) is a useful first diagnosis.- The one thing this chain guarantees is bit-identical unmasked pixels. If your un-masked areas are coming back changed, that's not this node - that's the sampler's denoise creeping too high. Which is exactly why the
recommended_denoiseoutput exists. Trust it.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| vae | VAE | — | |
| repair_scope | COMBO | auto | 4 options: auto, region, crop, canvas |
| repair_kernel | COMBO | auto | 4 options: auto, latent_mask, vae_inpaint, native_fill |
| task_hint | COMBO | auto | 11 options: auto, repair, remove, replace, fill, appearance, +5 |
| mask_grow | INT | 240–2048 | — |
| mask_blur | FLOAT | 8.00–256 | — |
| mask_threshold | FLOAT | 0.500–1 | — |
| invert_mask | BOOLEAN | false | — |
| crop_context | INT | 640–512 | — |
| crop_context_factor | FLOAT | 1.51–8 | — |
| min_size | INT | 25664–8192 | — |
| max_size | INT | 102464–8192 | — |
| resize_mode | COMBO | fit | 3 options: fit, pad, stretch |
| expand_left | INT | 00–4096 | — |
| expand_right | INT | 00–4096 | — |
| expand_top | INT | 00–4096 | — |
| expand_bottom | INT | 00–4096 | — |
| canvas_fill | COMBO | edge | 5 options: edge, blur, black, white, neutral |
| auto_recommend | COMBO | enabled | 2 options: enabled, disabled |
| modelopt | MODEL | — | |
| model_infoopt | STRING | — | |
| positiveopt | CONDITIONING | — | |
| negativeopt | CONDITIONING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| work_image | IMAGE | — |
| work_mask | MASK | — |
| repair_info | LLS_REPAIR_INFO | — |
| recommended_denoise | FLOAT | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |