Nodes/comfyui-timesaver/TS Universal Inpaint Sampler
ComfyUI Node

TS Universal Inpaint Sampler

Inpaint any model — no Fill checkpoint, no ControlNet, just this sampler

By AlexYez·Created 2 years ago·Updated a day ago· 12
TS Universal Inpaint Sampler
  • model
  • sampler
think_steps4
resample_strength1.00

Here's the state of inpainting in 2026: purpose-trained Fill checkpoints stopped shipping a while ago, and the models that do fill holes well are either huge or model-specific. So a training-free sampler that works with any diffusion model is genuinely useful - and that's exactly what TS Universal Inpaint Sampler is. No Fill checkpoint, no ControlNet, no per-model setup. Feed it a masked latent and it repaints the masked region so it agrees with the pixels around it.

The name says what it is: a SAMPLER, not a node that replaces your sampler. You drop it into ComfyUI's own SamplerCustomAdvanced the way you'd drop in euler or dpmpp_2m, and it slots into whatever custom sampling chain you already have.

How it works

The mechanism is the interesting part. Ordinary sampling looks at the masked region and its surroundings only through the model's own attention - it fills the hole, but it doesn't actively try to make the patch agree with what's around it. This sampler adds a corrective loop: between denoise steps it runs extra "think" iterations that resample the masked region while the known pixels pull it back into context. The result is a repaint that blends instead of merely filling.

Concretely, you feed SamplerCustomAdvanced a latent that carries a noise mask (made with the native SetLatentNoiseMask node), and hand it this sampler. The sampler reads the model's noising schedule - that's why the model input must be the same model the guider uses, so its resampling matches the parameterisation, eps or flow. That's the detail that makes it "universal": it adapts to how each model family is parameterised instead of assuming one format.

The cost is honesty in the tooltip: roughly (1 + think_steps) × slower than a plain sampler. You're paying for the corrective iterations.

The three inputs that matter

  • model - the same model the guider uses, needed to read its noising schedule.
  • think_steps - resample iterations per denoise step, default 4. 0 gives you plain masked Euler - useful as a baseline to see what the corrective loop is actually buying you. 3–6 removes seams; more is slower and cleaner. The defaults are tuned for photographic content.
  • resample_strength - the share of fresh noise per iteration. 1.0 (the default, and recommended) is a full resample; lower keeps more of the current draft.

The single output, sampler, is a SAMPLER object - wire it into the sampler slot of SamplerCustomAdvanced.

When to reach for it

If your graph is already a custom sampling chain - your own sigmas, your own guider - this is the natural way to get inpaint-aware sampling inside it rather than around it. If you're on a plain KSampler workflow, the pack's sibling TS Langevin Inpaint is the same idea packaged as a drop-in replacement for the sampler node, and might be the easier starting point. Both share the honest caveat from the inpainting world: mask-based repainting still uniquely gives you bit-identical untouched pixels, but it's slower than a one-sentence edit model, and for whole-frame edits an instruction model is often the better tool. This sampler is for the jobs where the mask must stay.

Installing it

It ships in comfyui-timesaver: ComfyUI Manager → search Timesaver, or

cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-timesaver
cd comfyui-timesaver
python -m pip install -r requirements.txt

then restart ComfyUI. No extra models to download - that's the whole pitch.

Gotchas

If a seam is still visible, raise think_steps rather than touching the model or the guider. If the patch turns mushy, lower it - more correction isn't always better. And the most common wiring mistake: feeding the sampler a plain latent with no noise mask. Without the mask there's nothing to repaint, so the "think" loop has no region to settle; make sure SetLatentNoiseMask is actually on the latent path.

CategoryTS/Image/Retouch

Inputs (3)

NameTypeDefaultDescription
modelMODELThe SAME model the guider uses — needed to read its noising schedule so resampling matches the parameterisation (eps or flow).
think_stepsINT40–20Resample iterations per denoise step. 0 = plain masked Euler; 3-6 removes seams; more = slower, cleaner.
resample_strengthFLOAT1.000.2–1Share of fresh noise per iteration. 1.0 = full resample (recommended); lower keeps more of the current draft.

Outputs (1)

NameTypeDescription
samplerSAMPLER