Detailer (Crop-Inpaint-Paste) π (TensorVizion)
The fix-a-face loop, without the Impact Pack install
- model
- vae
- image
- mask
- positive
- negative
- image
- summary
A face that occupies 70 pixels of a 1024px frame comes out as a smear, no matter how good your checkpoint is. The latent simply has no budget to spend there. The fix everyone eventually learns is the detailer loop: crop the bad region, upscale it, re-render it at full resolution, paste it back. Impact Pack's FaceDetailer made that famous, but it drags in a heavy dependency. This node runs the same loop off a plain MASK input - you supply the mask, it does the rest.
How the loop runs
The node name is the algorithm. It crops the image to your mask's bounding box (plus padding pixels), upscales that crop so its longer edge hits detail_size, re-samples the upscaled region with fresh conditioning, and composites the result back with a feathered edge. Under the hood it delegates the actual work to ComfyUI core - VAEEncodeForInpaint for the masked encode, KSampler for the pass, VAEDecode to get back to pixels - so the sampling math is the same stock math you already trust.
Where does the mask come from? Not from this node. It doesn't do detection. The natural upstream is the pack's Face Detect & Crop, or any mask source - a SAM mask, a hand-painted mask, an inpainting selection. That's actually the point: "all detailers are doing is zooming in on a mask, upscaling, and diffusing the upscaled image to add details," and this is the loop with the detector left as an input you choose.
The knobs that matter
Most defaults are fine; three are worth understanding:
- denoise (default 0.45) - how much of the region gets redrawn. This is the most important dial. Too high and you get a new face that doesn't match; too low and nothing changes. 0.3β0.45 is the usual working range, matching core inpainting guidance.
- detail_size (default 768) - the resolution the crop is upscaled to for the pass. Bigger = more detail budget, slower, and more drift from the original. A small face doesn't need 2048.
- padding (default 32) - context around the mask so the model has something to work against. Too little padding and the patch looks pasted-on.
You also get the standard sampler row - steps, cfg, sampler_name (dpmpp_2m), scheduler (karras), seed - plus feather (default 8) for seam softening. Output is the composited image and a summary string reporting the region and sampling resolution.
Install and gotchas
Part of the OmniNodes pack:
cd ComfyUI/custom_nodes/
git clone https://github.com/TensorVizion/OmniNodes
Restart ComfyUI, or search "OmniNodes" in ComfyUI Manager. No heavy dependencies - no Ultralytics, no AGPL baggage, nothing beyond the PyTorch stack ComfyUI already ships.
Two failure modes are worth internalizing. First, the clone problem: if you detail several regions (say, a crowd of faces) they all re-render on the same base seed and converge into the same person. Vary the seed per region or accept the drift. Second, over-processing: if the region is already sharp, a second pass just changes it without improving it. This is a repair tool for the small broken parts of an otherwise-good generation, not a quality dial to leave on. And a square bbox mask can leave visible seams - feather helps, and a segmentation-shaped mask helps more. Run it at native resolution before you upscale the whole image, not after, or you're baking the mangled face into more pixels and paying more to fix it.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| vae | VAE | β | |
| image | IMAGE | β | |
| mask | MASK | β | |
| positive | CONDITIONING | β | |
| negative | CONDITIONING | β | |
| seed | INT | 00β18446744073709550000 | β |
| steps | INT | 201β10000 | β |
| cfg | FLOAT | 7.00β100 | β |
| sampler_name | STRING | dpmpp_2m | β |
| scheduler | STRING | karras | β |
| denoise | FLOAT | 0.450β1 | β |
| padding | INT | 320β512 | β |
| detail_size | INT | 768128β2048 | β |
| feather | INT | 80β128 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| summary | STRING | β |