ComfyUI Node
TS Smart Inpaint
Regenerate or refine only the masked region: it crops with context, samples at full detail and composites the result back.
TS Smart Inpaint
- model
- vae
- positive
- negative
- image
- mask
- reference
- image
◄replacetrue►
◄denoise1.00►
◄megapixels1.5►
◄context_pct8.0►
◄feather_pct3.0►
◄resize_methodlanczos►
◄seed0►
◄steps4►
◄cfg1.0►
◄sampler_nameeuler►
◄schedulersimple►
CategoryTS/Image/Retouch
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Diffusion model used to regenerate the masked region. | |
| vae | VAE | VAE used to encode the crop to latent and decode the result. | |
| positive | CONDITIONING | Positive conditioning describing what to generate inside the mask. | |
| negative | CONDITIONING | Negative conditioning describing what to avoid. | |
| image | IMAGE | Full source image to inpaint. | |
| mask | MASK | Mask marking the region to inpaint (white = regenerate). | |
| replace | BOOLEAN | true | Replace = Smart Inpaint: regenerates the masked region from scratch (reference_latents = the crop; an optional `reference` image is chained as a 2nd reference — 'fill with THIS'). Denoise is IGNORED and locked to 1.0. Refine = partial denoise of the existing content at the Denoise value (no reference). |
| denoise | FLOAT | 1.000–1 | Refine mode only: how much of the existing content is redrawn (1.0 = fully). Ignored in Replace mode (locked to 1.0). |
| megapixels | FLOAT | 1.50.1–8 | Processing budget for the masked crop. Small crops upscale toward it; oversized crops downscale to it to bound VAE/sampler cost. Raise for more detail. |
| context_pct | FLOAT | 8.00–50 | Context band around the mask the model sees during refine, as a PERCENT of the mask's own size (not fixed pixels) — so it scales with the selection. Also hosts the colour-correction ring. ~8% is a sensible default; raise for more surrounding context. |
| feather_pct | FLOAT | 3.00–25 | Feather (edge blend) width as a PERCENT of the mask's own size rather than fixed pixels — a small mask gets a proportionally small feather (no over-soft ghosting on thin strokes), a big mask a wider blend. Clamped to a small px floor. ~3% is a sensible default; 0 = hard edge. |
| resize_method | COMBO | lanczos | Interpolation used to up/downscale the image crop. lanczos and bicubic keep the most detail. |
| seed | INT | 00–18446744073709550000 | Noise seed for the sampler. Change for a different variation of the inpainted region. |
| steps | INT | 41–100 | Number of sampling steps. More steps trade speed for quality. |
| cfg | FLOAT | 1.00–30 | Classifier-free guidance scale. Higher values follow the prompt more strongly. |
| sampler_name | COMBO | euler | Sampling algorithm used to denoise the region. |
| scheduler | COMBO | simple | Noise schedule that controls how sigma decreases across steps. |
| referenceopt | IMAGE | Optional reference image (Replace only). VAE-encoded and chained as a 2nd reference_latents after the crop, so the masked region is filled toward THIS picture's content. Leave unconnected for plain Smart Inpaint. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |