NSFW AI Inpainting Guide: Fix and Edit Images (2026)

14 min read

NSFW AI inpainting regenerates only a masked region of an image while keeping the rest untouched, so you can fix anatomy, change clothing, add or remove elements, or refine detail without rerolling the whole picture. The core controls are the mask, the inpaint area (whole picture vs only masked), and denoising strength, which sets how much the masked area changes from 0.2 (subtle) up to 0.75 or higher (a full reinvention).

How inpainting works

Inpainting takes an existing image, a mask you paint over the area you want to change, and a prompt describing what should appear there. Stable Diffusion then re-runs the diffusion process only inside the masked region, blending the new pixels back into the surrounding image. Everything outside the mask stays exactly as it was. This is what makes it the workhorse of serious NSFW editing: instead of accepting a 90 percent good generation and rerolling for the last 10 percent, you fix the 10 percent in place.

The single most important variable is denoising strength, which decides how much freedom the model has inside the mask. At low values it nudges; at high values it replaces. Get an intuition for that one slider and most inpainting problems solve themselves. The second most important choice is the inpaint area mode, which decides whether the model sees the whole image or zooms into just the masked box for maximum detail.

Inpainting lives in the img2img tab in A1111 and Forge, under the Inpaint sub-tab, and as a dedicated node graph in ComfyUI. If you want to experiment with prompts and edits before installing anything locally, our free NSFW AI image generator lets you generate base images you can later refine with local inpainting.

Masked region highlighted with a denoise slider beside it, abstract concept

Setting up the mask

Upload your image to the Inpaint tab and paint over the area to change with the brush. The brush size slider matters: paint a little beyond the edge of the thing you are changing so the model has context to blend into, but not so far that you regenerate things you wanted to keep. Two mask-handling settings shape the result.

Mask Mode (Inpaint masked vs Inpaint not masked). Inpaint masked regenerates the area you painted, which is the normal mode. Inpaint not masked inverts it and regenerates everything except what you painted, which is useful when it is easier to mask the thing you want to protect (a face, a logo) than the large area you want to change.

Mask Blur softens the edge of the mask so the new region blends smoothly instead of showing a hard seam. A value around 4 to 8 pixels is a sensible default. Too little blur leaves a visible boundary; too much bleeds the change outside the intended area.

# Sensible inpaint mask defaults (A1111/Forge):
Mask blur: 4 to 8
Mask mode: Inpaint masked
Masked content: original   # or 'fill' / 'latent noise' / 'latent nothing'
Inpaint area: Only masked
Only masked padding (pixels): 32

Masked content decides what the masked pixels start from before denoising. Original keeps the existing pixels as the base (best for subtle fixes). Fill starts from a blurred average color. Latent noise and latent nothing start from scratch and need high denoise. For most NSFW fixes, original with a moderate denoise is the right call.

Denoising strength explained

Denoising strength is the heart of inpainting. It runs from 0 to 1 and controls how far the masked region moves away from its starting pixels.

  • 0.2 to 0.35 (subtle): light cleanup. Smoothing skin, fixing a small texture glitch, removing a minor artifact. The content barely changes shape.
  • 0.4 to 0.55 (moderate): real edits that respect the existing structure. Refining a face, fixing a slightly malformed hand, adjusting detail. This is the most-used band.
  • 0.6 to 0.75 (strong): substantial change. Adding or removing clothing, reshaping anatomy, replacing an element while loosely following the existing layout.
  • 0.8 to 1.0 (full reinvention): the masked area is essentially regenerated from the prompt with little regard for what was there. Use when you want something entirely new in that spot.
Denoise range Effect Typical use
0.20 to 0.35 Subtle nudge Skin smoothing, tiny artifact fix
0.40 to 0.55 Structure-respecting edit Face refine, mild hand fix
0.60 to 0.75 Strong change Clothing add/remove, reshape
0.80 to 1.00 Full regeneration Replace element entirely

The practical workflow is to start lower than you think you need, around 0.4, and step up by 0.1 until the change is strong enough. Jumping straight to 0.8 usually produces something that ignores the surroundings and looks pasted in.

Inpaint area: whole picture vs only masked

This setting quietly determines your detail quality. Whole picture runs the diffusion on the full image and only writes back the masked region. It keeps global context but the masked area only gets a fraction of the model’s resolution, so small regions come out soft. Only masked crops to a box around your mask, upscales that crop to the full generation resolution, regenerates it at high detail, then shrinks it back into place. For anything small (a hand, a face, an eye), Only masked is dramatically sharper.

Only masked padding sets how much surrounding context is included in that crop. Too little padding and the model loses the context it needs to match lighting and skin tone; too much and the detail benefit shrinks. Around 32 pixels is a good starting point, raise it to 64 if the fix is not blending with its surroundings.

# Fixing a small hand at high detail:
Inpaint area: Only masked
Only masked padding: 32 to 64
Denoising strength: 0.45 to 0.6
Mask blur: 4
Sampling steps: 25 to 30

Inpainting checkpoints vs regular checkpoints

There are dedicated inpainting checkpoints (models with an extra input channel trained specifically for filling masked regions, often named with an -inpainting suffix). They blend masked edits more cleanly, especially at higher denoise, because they were trained on the inpainting task. Regular checkpoints can inpaint perfectly well too, and on SDXL, Pony, and Illustrious most people just use the standard model since dedicated inpainting variants are less common there.

The practical reality: for SD1.5, a dedicated inpainting checkpoint is worth having for tricky add/remove edits. For SDXL based NSFW models like Pony and Illustrious, use the regular checkpoint with a sensible denoise and Only masked, and results are excellent. Soft inpainting (below) also narrows the gap. To choose a base model, the best Stable Diffusion checkpoints for NSFW roundup is a good starting point, and the how to install NSFW checkpoints guide covers getting them into your folders.

Practical edits: fixing, clothing, adding and removing

Fixing details. Faces and hands are the usual targets. Mask the area, set Only masked, denoise 0.45 to 0.6, and write a short prompt describing what should be there (a clean prompt like detailed face, looking at viewer beats your entire original prompt). For hands specifically, layering ControlNet helps, covered in the dedicated fix hands guide.

Changing or removing clothing. Mask the garment, prompt for the new state, and use denoise 0.6 to 0.8 because you are changing structure, not just texture. Removing clothing entirely needs the higher end of that range and a checkpoint capable of the underlying anatomy. Keep your quality and negative prompts in place so the regenerated skin matches the rest of the image.

Adding elements. Mask empty space, prompt the new element, and use high denoise (0.75+) with masked content set to latent noise or fill so the model builds from scratch rather than trying to preserve background pixels.

Removing elements. Mask the unwanted object, prompt only the background that should replace it, and use moderate to high denoise. The model paints over the object with plausible surroundings.

Before and after edit split of a masked area, glowing on dark

Soft inpainting

Soft inpainting (available in A1111 and Forge) replaces the hard binary mask with a soft, schedule-based blend that mixes the new and original content more gradually during denoising. It produces noticeably smoother transitions than mask blur alone, especially when adding or removing larger elements where a hard edge would otherwise show. Enable it, then tune the schedule bias and preservation strength: more preservation keeps the edit closer to the original, less lets it diverge. For seamless clothing changes and element removal on detailed NSFW images, soft inpainting is often the difference between a believable edit and an obvious patch.

# Soft inpainting starting point:
Soft inpainting: enabled
Schedule bias: 1.0
Preservation strength: 0.5
Transition contrast boost: 4
Denoising strength: 0.6 to 0.8

ComfyUI notes

In ComfyUI, inpainting is built from nodes rather than a single tab, which gives more control at the cost of setup. The common pattern uses a Load Image node feeding a mask (painted in the node’s mask editor or supplied separately), a VAE Encode (for Inpainting) node, and a KSampler whose denoise value plays the same role as denoising strength in A1111. The Set Latent Noise Mask node is the key piece: it tells the sampler which latent region to regenerate. For Only-masked style high-detail fixes, the InpaintModelConditioning node plus a crop-and-stitch workflow (community nodes like those that crop the masked region, sample, and stitch back) reproduces the A1111 Only masked behavior with better control. If you are moving into node-based work, the ComfyUI for NSFW guide walks through the full setup, and pairing inpainting with img2img and ControlNet covers nearly every advanced edit.

A reliable inpainting routine

Start with the image at a good resolution, since inpainting cannot add detail the source never had. Paint the mask slightly larger than the target with mask blur around 4 to 8. Set Inpaint area to Only masked with 32 pixels of padding. Write a short, specific prompt for just the masked region. Begin at denoise 0.4 and step up by 0.1 until the change is strong enough without losing blend. If the edit looks pasted in, lower denoise, raise padding, or switch on soft inpainting. If small details stay soft, you are probably on Whole picture instead of Only masked, or your source resolution is too low. Two or three passes, each masking a smaller area, will clean up almost any image. Save the working image between passes so you can roll back if a later edit makes things worse, and keep notes on the denoise and padding values that worked for a given checkpoint, because those settings transfer well across similar images and save you from re-tuning every time.

Mask blur and padding controls on a dark editing panel, neon nodes

Prompting the masked region

A mistake beginners make is leaving the full original prompt in place while inpainting a tiny area. The model then tries to fit the entire scene description into the mask, which produces strange, crowded results. Inside the mask, the model only needs to know what belongs there. When fixing a face, a prompt as short as detailed face, soft lighting, looking at viewer outperforms a 60-token description of the whole image. When changing a garment, describe only the garment and the body underneath. Keep your negative prompt, since it still suppresses artifacts inside the masked region, and lean on a strong negative prompt list to keep skin and anatomy clean. If you are unsure what phrasing works, the prompt examples collection gives tested starting points you can trim down for masked edits.

Seed behavior also matters during inpainting. A fixed seed makes results reproducible so you can tweak one setting at a time and see exactly what changed. A random seed (set seed to -1) is better when an edit is close but not quite right and you want to roll variations of the same masked region. Most editing sessions alternate: lock the seed to dial in settings, then unlock it to hunt for the best variation.

Sampling settings carry over from normal generation but a couple of tweaks help inpainting. Bump steps slightly (25 to 30) for masked regions, since a small area benefits from extra refinement and the cost is tiny. Keep the same sampler you used for the base image so the style stays consistent. CFG scale can usually stay where it was, but if a masked edit comes out oversaturated or fried, lower CFG by a point or two, because the cropped Only masked region can amplify high-CFG artifacts. And always match the model and VAE you generated the original with, or the inpainted patch will subtly shift in color and contrast and refuse to blend no matter how much mask blur you add.

Resolution, upscaling, and order of operations

Inpainting cannot invent detail the source image never captured, so the order you work in matters. The reliable sequence is generate at base resolution, inpaint the structural fixes (anatomy, hands, faces, clothing) while the image is still small and fast, then upscale, and only inpaint again afterward for any fine detail the upscale softened. Inpainting before upscaling is faster and the fixes carry up cleanly; inpainting a 4K image directly is slow and the Only masked crop may already be larger than your generation resolution, which wastes the high-detail benefit.

When you do upscale, an img2img upscale or a Tile-ControlNet pass preserves the inpainted fixes far better than a plain resize, and you can chain a final low-denoise inpaint (around 0.25) over the upscaled image to crisp up eyes or jewelry. If you generated your base image elsewhere, including with our free NSFW AI image generator, you can bring it straight into the Inpaint tab as the source and apply this same fix-then-upscale routine locally. The discipline of fixing structure first and polishing last is what separates clean edited NSFW images from ones that look obviously retouched.

Frequently asked questions

What denoising strength should I use for inpainting?

It depends on how much you want to change. Use 0.2 to 0.35 for subtle cleanup like skin smoothing, 0.4 to 0.55 for structure-respecting edits like refining a face, 0.6 to 0.75 for strong changes like adding or removing clothing, and 0.8 to 1.0 to regenerate the masked area entirely. Start around 0.4 and step up by 0.1 until the change is strong enough without looking pasted in.

What is the difference between Whole picture and Only masked?

Whole picture runs diffusion on the full image and writes back only the masked region, keeping global context but giving the masked area low effective resolution. Only masked crops to a box around the mask, upscales it to full generation resolution, regenerates it at high detail, then shrinks it back. For small fixes like a hand, eye, or face, Only masked is far sharper and is almost always the right choice.

Do I need a dedicated inpainting checkpoint?

For SD1.5, a dedicated inpainting checkpoint (often named with an -inpainting suffix) blends masked edits more cleanly at higher denoise and is worth having for tricky add or remove tasks. For SDXL based NSFW models like Pony and Illustrious, dedicated inpainting variants are uncommon, and the regular checkpoint with Only masked plus a sensible denoise gives excellent results. Soft inpainting further narrows the gap on any model.

What does mask blur do?

Mask blur softens the edge of your mask so the regenerated region blends smoothly into the surrounding image instead of showing a hard seam. A value of about 4 to 8 pixels works for most edits. Too little leaves a visible boundary where new and old pixels meet; too much bleeds the change beyond the area you intended to edit. Increase it slightly for larger edits, decrease for precise small fixes.

What is masked content and which option should I pick?

Masked content sets what the masked pixels start from before denoising. Original keeps the existing pixels, best for subtle fixes that respect what is there. Fill starts from a blurred average color. Latent noise and latent nothing start from scratch and need high denoise. For most NSFW fixes use original with moderate denoise. When adding a new element to empty space, use fill or latent noise with high denoise instead.

How do I change or remove clothing with inpainting?

Mask the garment, write a prompt describing the new state, and use denoise 0.6 to 0.8 because you are changing structure, not just texture. Removing clothing needs the higher end of that range and a checkpoint capable of the underlying anatomy. Keep your quality tags and negative prompt so the regenerated skin matches the rest. Soft inpainting helps the edit blend seamlessly instead of looking patched on.

What is soft inpainting and when should I use it?

Soft inpainting replaces the hard binary mask with a gradual, schedule-based blend that mixes new and original content more smoothly during denoising. It produces noticeably cleaner transitions than mask blur alone, especially when adding or removing larger elements where a hard edge would show. Enable it and tune preservation strength: more keeps the edit close to the original, less lets it diverge. It is excellent for seamless clothing edits.

Can I inpaint in ComfyUI?

Yes. ComfyUI builds inpainting from nodes: a Load Image with a mask, a VAE Encode for Inpainting node, a Set Latent Noise Mask node to mark the region, and a KSampler whose denoise matches A1111 denoising strength. The InpaintModelConditioning node and community crop-and-stitch workflows reproduce A1111 Only masked behavior with high detail. It is more setup than the A1111 tab but offers finer control over masking and conditioning.