Inpainting technology, powered by Stable Diffusion, opens up new horizons for image repair and modification. This innovative method uses the context of intact image segments to reconstruct altered or incomplete parts, simplifying defect removal and image customization.
Fooocus makes inpainting unusually approachable: upload an image, paint a mask, pick a method, and generate. This tutorial covers the basic workflow, then the advanced techniques (mask control, denoise strength, engine versions, multi-pass editing, outpainting) that separate a visible patch from a seamless edit. If you are new to the tool itself, start with how to use Fooocus and come back here.
Getting Started with Fooocus Inpainting
Activating Inpainting in Fooocus
- Check the "Input Image" box below the Prompt field
- Open the "Inpaint or Outpaint" tab
Note: When active, the Generate button performs inpainting based on the uploaded image and specified options, while still considering the main prompt.
If you don't have it locally you can still use it in Google Colab with the official notebook: fooocus_colab.ipynb.
Inpainting Techniques in Fooocus
1. Completing an Image
Perfect for restoring damaged photos:
- Upload the image
- Define the inpainting mask using the drawing tool
- Write a prompt describing the desired outcome
- Click Generate
2. Enhancing Details
Ideal for improving specific areas like faces or hands:
- Upload the image
- Draw a mask over the area to enhance
- Select "Improve Detail" as the Method
- Provide a complementary prompt for the area
- Generate and repeat for other areas if needed
3. Adding Elements
Transform your image by adding new objects or details:
- Upload the image
- Draw a mask where you want to add the new element
- Choose "Modify Content" as the Method
- Write a prompt describing the new element
- Generate and repeat to add multiple elements
4. Removing Objects
Remove Object fills the masked area from its surroundings and ignores the prompt:
- Upload the image
- Paint over the object, extending the mask slightly past its shadow and edges
- Choose "Remove Object" as the Method
- Generate; if a ghost of the object remains, widen the mask and run again
Choosing the Right Method
The Method dropdown is the single setting that most often decides whether a result works,
and picking the wrong one is the most common reason inpainting "does nothing".
| Method | Use it when | What it does |
|---|---|---|
| Improve Detail | Faces, hands, eyes, text, small textures | Refines what is already inside the mask, keeping composition |
| Modify Content | Adding or replacing an object | Generates new content from your prompt inside the mask |
| Remove Object | Deleting something | Fills the mask from surrounding context, ignoring the prompt |
If you mask a region, write a prompt describing something new, and get back a subtly cleaner
version of the original, you are on Improve Detail and want Modify Content.
Advanced Inpainting Options
For experienced users, Fooocus offers advanced configuration options:
- Check the "Advanced" box next to "Input Image"
- Open the "Advanced" tab
- Enable "Developer Debug Mode"
- Access the "Inpainting" tab for detailed options
Key Advanced Parameters:
- Debug Inpaint Preprocessing: Visualize the pre-processing steps
- Disable initial latent in inpaint: Toggle consideration of content outside the mask
- Inpaint Engine: Select the model version
- Inpaint Denoising Strength: Control the influence of the original image
- Inpaint Respective Field: Adjust the size of the generated inpainting area
- Mask Erode or Dilate: Modify mask edges
- Enable Mask Upload: Use a custom mask image
- Invert Mask: Reverse the mask effect
Denoising Strength in Practice
Inpaint Denoising Strength controls how much of the original pixels survive. It is the
second setting worth learning properly:
- 0.2 to 0.4: light touch-ups, texture and blemish cleanup, keeps the original almost intact
- 0.5 to 0.7: the useful middle ground for detail work on faces and hands
- 0.8 to 1.0: effectively regenerates the masked region; required when adding an object, but it will ignore what was there before
Start in the middle and move in one direction. Large jumps make it hard to tell which change
caused which result.
Advanced Inpainting Techniques
The techniques below are what turn a visible patch into an edit nobody can spot. All of them live behind Developer Debug Mode in the Inpainting and Control tabs, and each one addresses a specific failure you will recognize from your own results.
Mask Shape, Erode and Dilate
A good mask is slightly larger than the defect and falls on plain surfaces rather than edges. The pillar rule of thumb is a mask roughly 30 percent larger than the visible problem: too small and the model has no room to blend, too large and it regenerates content you wanted to keep. Mask Erode or Dilate adjusts the painted mask numerically after the fact. Positive values grow it (dilate), which softens transitions and hides seams; negative values shrink it (erode), which protects neighboring detail when the mask was painted loosely. Grow the mask when you see a hard outline around the edit, shrink it when the edit bleeds into areas that should have stayed untouched.
Inpaint Respective Field
Inpaint Respective Field sets how much of the surrounding image the model looks at while filling the mask. A small field concentrates resolution on the masked area, which is what you want for eyes, teeth, jewelry, and other fine detail. A large field gives the model more context about lighting, perspective, and scale, which is what you want for faces, limbs, and any object that has to match the rest of the scene. If a repainted face looks technically sharp but slightly wrong in size or angle, raise the field; if a small detail comes out mushy, lower it.
Denoise Ranges by Task
| Task | Method | Denoise range | Notes |
|---|---|---|---|
| Skin, texture, blemish cleanup | Improve Detail | 0.2 to 0.4 | Keep prompt short and descriptive of the area |
| Faces, hands, eyes | Improve Detail | 0.5 to 0.7 | Mask the whole head or hand, not just the flaw |
| Replace an object with another | Modify Content | 0.8 to 1.0 | Describe the new object and its lighting |
| Add something that was not there | Modify Content | 0.9 to 1.0 | Two passes usually beat one, see below |
| Delete an object | Remove Object | not used | Method ignores prompt and strength |
| Change a background | Modify Content | 0.8 to 1.0 | Invert Mask to select everything except the subject |
Disable Initial Latent
Disable initial latent in inpaint stops Fooocus from seeding the masked area with the original pixels. Leave it off for touch-ups and detail work, where the original content is a useful starting point. Turn it on when the original content is fighting you: for example, when a removed object keeps reappearing faintly, or when you want a completely new element and the model keeps echoing the shape that was there before.
Inpaint Engine Versions
The Inpaint Engine dropdown selects which inpainting model version Fooocus loads. Newer versions generally blend better at mask edges and follow prompts more closely; older versions are kept for reproducing earlier results. If an old workflow suddenly produces worse seams after an update, the engine version is the first setting to check. There is no universally best choice, so pick one, fix your seed, and compare on the same image before committing.
Mixing Image Prompt with Inpaint
Fooocus can guide an inpaint with a reference image at the same time, which is how you do style transfer or face swaps that preserve the rest of the picture:
- Access the "Advanced" panel
- Enable "Developer Debug Mode"
- Open the "Control" tab
- Check "Mixing Image Prompt and Inpaint"
Upload the reference in an Image Prompt slot, mask the region to change, and keep the Image Prompt weight moderate so the reference influences the edit without overriding the surrounding lighting. This combination is the route for face swaps and background style changes while preserving the subject. For how Image Prompt weights and stop points behave on their own, see the Fooocus image prompts guide.
Multi-Pass Workflow
Complex edits work better as several small inpaints than one large one. A reliable sequence:
- Structure pass. Modify Content at high denoise with a generous mask to place the new object or fill the removed area.
- Blend pass. Improve Detail at 0.3 to 0.5 with a mask that straddles the boundary of the first edit, so the seam is regenerated with context from both sides.
- Detail pass. Improve Detail at 0.5 to 0.7 on faces, hands, or text inside the new region.
- Optional upscale. Once the composition is right, run Upscale or Vary (Subtle) on the whole image to unify grain and sharpness.
Fix the seed between passes so that re-running a step changes only what you intended.
Outpainting Directions
Outpainting extends the canvas instead of editing inside it. In the "Inpaint or Outpaint" tab, tick one or more directions (Left, Right, Top, Bottom) and Fooocus paints new content beyond the current edge. Extend one direction at a time for the most coherent results, describe the scene continuation in the prompt rather than the subject, and use Improve Detail afterwards on the join if you can see it. Large extensions work best in two steps rather than one big jump.
LoRAs and Checkpoints Still Apply
Inpainting uses whatever base checkpoint and LoRAs you have selected, so a realistic checkpoint produces realistic fills and an anime checkpoint produces anime fills. If the inpainted region looks stylistically different from the rest of the image, check that the checkpoint matches the one the image was made with. Our guides to LoRAs in Fooocus and the best SDXL models cover picking and stacking them.
Fixing Common Inpainting Problems
| Symptom | Cause | Fix |
|---|---|---|
| Visible seam around the edit | Mask boundary lands on detail | Dilate the mask so the edge falls on a flat area |
| New element has wrong lighting | Model only sees the masked region | State the lighting in the prompt ("lit from the left, warm evening light") |
| Faces come back distorted | Mask too small to resolve a face | Widen the mask to the whole head, raise Respective Field |
| Object will not disappear | Not enough clean context to sample | Widen the mask, remove in two passes, enable Disable Initial Latent |
| Results change wildly each run | High denoise plus random seed | Lower strength or fix the seed while tuning |
| Nothing changes | Wrong method or Input Image not ticked | Switch Improve Detail to Modify Content, confirm the checkbox and tab |
Visible seam around the edited region: the mask boundary is landing on detail. Grow the
mask slightly with Mask Erode or Dilate so the transition falls on flat area rather than an
edge, and avoid tracing tightly around the subject.
The new element does not match the lighting: inpainting only sees the masked region and
its immediate surroundings. Describe the lighting explicitly in the prompt ("lit from the
left, warm evening light") rather than expecting it to be inferred.
Faces come back distorted: the masked area is too small for the model to resolve a
coherent face. Widen the mask to include the whole head, and increase Inpaint Respective
Field so more context is considered.
The object will not disappear: Remove Object needs clean surroundings to sample from. If
the object touches a busy edge, remove it in two passes, working from the simpler side.
Results change wildly between runs: this is expected at high denoise. Lower the strength
or fix the seed so you are comparing like with like while you tune.
Fooocus Inpainting vs Other Tools
Fooocus is the fastest route to good inpainting because the three methods, the engine, and the mask tools are already wired together. ComfyUI offers more control (custom inpaint models, differential diffusion, per-node masks) at the cost of building the graph yourself, and Automatic1111 sits in between. Our Fooocus vs ComfyUI vs Automatic1111 comparison covers when each is the better fit, and the ComfyUI 2026 guide is where to go if you need that extra control.
Conclusion
Fooocus Inpainting opens up a world of possibilities for image manipulation and creation. Learn the three methods, tune denoise strength deliberately, control the mask with erode and dilate, and work in passes, and most edits become invisible. For everything else Fooocus can do, see the Fooocus 2026 complete guide.
FAQ
Why does the Generate button do nothing after I upload an image?
The "Input Image" checkbox below the prompt has to be ticked and the "Inpaint or Outpaint"
tab selected. Without both, Fooocus runs an ordinary text-to-image generation.
Do I still need a prompt when inpainting?
For Improve Detail and Modify Content, yes: describe what should be in the masked area, not
the whole picture. For Remove Object the prompt is ignored.
Can I use my own mask instead of drawing one?
Yes. Enable Developer Debug Mode, open the Inpainting tab and turn on Enable Mask Upload.
Invert Mask flips which side is treated as the region to change.
Which inpaint engine version should I use?
Newer engine versions generally blend better at mask edges. If an older workflow suddenly
produces worse seams after an update, the engine version is the first setting to check.
Can I inpaint and use an image prompt at the same time?
Yes. Enable Developer Debug Mode, open the Control tab and tick "Mixing Image Prompt and
Inpaint". This is the route for style transfer or face swaps that preserve the subject.
What denoising strength should I use for inpainting?
Use 0.2 to 0.4 for light touch-ups, 0.5 to 0.7 for faces and hands, and 0.8 to 1.0 when adding or replacing an object. Start in the middle and adjust in one direction with a fixed seed.
What does "Disable initial latent in inpaint" do?
It stops Fooocus from using the original pixels as the starting point for the masked area. Turn it on when a removed object keeps reappearing or when you want entirely new content instead of a variation of what was there.
Last reviewed and updated: September 2026.




Top comments (0)