Stable Diffusion - Inpainting with Fooocus - Don't Regenerate, Fix!

Kleebz Tech AI
25 Jan 202415:14

TLDRThis video tutorial introduces the inpainting feature of Fooocus, a tool for AI image generation. It demonstrates how to correct minor imperfections, remove unwanted elements, or creatively alter images without starting from scratch. The host guides viewers through the process of using inpainting to change eye color, hair color, and add details to an image, as well as experimenting with real photographs and the 'modify content' option for more significant alterations. The video emphasizes the importance of experimentation with AI tools to achieve desired results.


  • 🎨 Fooocus offers a powerful inpainting engine for image editing, useful for correcting imperfections or creatively altering images.
  • πŸ–ŒοΈ Inpainting allows you to regenerate specific parts of an image without starting from scratch, fixing minor imperfections post-generation.
  • πŸ“Œ To begin inpainting, select the 'Input Image' checkbox and navigate to the 'Inpaint or Outpaint' tab within Fooocus.
  • πŸ–ΌοΈ You can work with generated images or real photographs for inpainting, providing flexibility in editing various types of media.
  • πŸ› οΈ Tools like 'undo,' 'clear,' and brush size adjustment are available to refine your inpainting process.
  • πŸ” Zooming and panning tools (Shift + wheel, Control + wheel, and F key) help in detailing and focusing on specific areas of the image.
  • 🎨 The initial generation process might take longer due to downloading models and upscaling the image if necessary.
  • πŸ”„ If the upscaling process stalls, a simple 'enter' key press in the command prompt window can sometimes help.
  • πŸ’‘ Inpainting can be used to change features like eye color, hair color, and clothing details to better match the desired outcome.
  • πŸ” 'Improve Detail' feature can enhance specific parts of the image, such as teeth or facial features, for a more realistic touch.
  • πŸ“ Experimentation is key when working with AI image generation tools like Fooocus, as results can vary and require fine-tuning.

Q & A

  • What is the primary purpose of the inpainting engine in Fooocus?

    -The primary purpose of the inpainting engine in Fooocus is to regenerate parts of an image, which is useful for correcting imperfections, removing unwanted elements, or creatively altering parts of an image without starting from scratch.

  • What kind of images can be improved using Fooocus' inpainting feature?

    -Fooocus' inpainting feature can be used to improve AI-generated images with minor imperfections, as well as real photographs and other images where specific parts need alteration or enhancement.

  • How does one begin the inpainting process in Fooocus?

    -To begin the inpainting process in Fooocus, you start by checking the 'Input Image' checkbox, then navigate to the 'Inpaint or Outpaint' tab, and proceed with the necessary adjustments and selections.

  • What tools are available for users during the inpainting process?

    -During the inpainting process, users have access to tools like 'undo,' 'clear,' 'remove image,' and a brush size slider. Additionally, there are keyboard shortcuts for zooming, changing brush size, resetting zoom, and entering full screen mode.

  • What is the significance of masking in inpainting?

    -Masking in inpainting is crucial as it defines the area of the image that the AI should focus on altering. Proper masking ensures that only the intended part of the image is changed, while the rest remains unaffected.

  • How does Fooocus handle the generation of inpainted images?

    -Fooocus generates inpainted images by using the defined mask to identify the area for alteration. It then processes the changes based on the original prompt or any additional instructions provided by the user, aiming to blend the changes seamlessly with the rest of the image.

  • What happens if the image needs upscaling before inpainting?

    -If the image needs upscaling before inpainting, the system will first increase the image's resolution. This step may take a few minutes, depending on the system's capabilities, before the inpainting process is applied.

  • What is the 'Improve Detail' feature in Fooocus used for?

    -The 'Improve Detail' feature in Fooocus is used to enhance the details of a specific part of the image that has been masked. It can be particularly useful for fine-tuning elements like facial features or objects that require more precision.

  • How does the 'modify content' option differ from the standard inpainting method?

    -The 'modify content' option is designed for making significant changes to a larger part of the image, whereas the standard inpainting method is more suitable for smaller, more precise alterations. The 'modify content' approach may yield better results for substantial modifications.

  • What is the recommended approach for achieving the best results with Fooocus' inpainting feature?

    -The recommended approach for achieving the best results with Fooocus' inpainting feature is through experimentation. Since there are no guaranteed outcomes, users should try different settings, prompts, and methods to find what works best for their specific images.

  • What can users expect in terms of results when using the inpainting feature?

    -Users can expect varied results when using the inpainting feature. While it often does a good job of blending changes and improving details, sometimes the results may not be perfect and may require multiple attempts or adjustments to achieve the desired outcome.



🎨 Introduction to Inpainting with Fooocus

This paragraph introduces viewers to the basics of inpainting using Fooocus, a tool designed for regenerating parts of an image. The video aims to teach how to correct imperfections, remove unwanted elements, or creatively alter images without starting from scratch. It mentions that while AI image generation often produces near-perfect images, inpainting can fix minor flaws. The speaker also references other videos covering Fooocus installation and basic usage, and plans to create more advanced inpainting tutorials in the future. The video then demonstrates how to start Fooocus and navigate to the 'Inpaint or Outpaint' tab, which is where the inpainting process begins.


πŸ–ŒοΈ Inpainting Process and Tools

In this paragraph, the speaker explains the inpainting process in Fooocus, detailing the steps to start inpainting, including selecting the 'Input Image' checkbox and navigating to the correct tab. The video then showcases the tools available within Fooocus for inpainting, such as 'undo,' 'clear,' and 'remove image,' as well as the brush size slider for precise masking. Tips for using the canvas, like zooming and panning, are provided to help viewers make detailed changes to their images. The paragraph emphasizes the utility of inpainting for correcting specific parts of an image, such as changing eye color, without the need to regenerate the entire image.


🌟 Advanced Inpainting Techniques and Results

This paragraph delves into more advanced inpainting techniques, such as changing hair color and improving details in specific areas of an image. The speaker demonstrates how to mask out the hair and add a new color, as well as how to use the 'Improve Detail' feature to enhance the quality of certain parts, like teeth. The video shows the results of these changes and discusses the potential need for multiple attempts to achieve desired outcomes. It also explores the 'modify content' method for making more significant alterations to an image, like adding a crown to a goat's head in a real photo. The speaker encourages experimentation with Fooocus and Stable Diffusion, as results can vary and there is no one-size-fits-all solution.




Inpainting is a technique used in image editing that focuses on regenerating or altering parts of an image. In the context of the video, it is used to correct imperfections, such as changing eye color from blue to green, without having to recreate the entire image from scratch. The process involves masking the area of the image that needs modification and then generating or altering that specific part, allowing for precise image adjustments.


Fooocus is a software application mentioned in the video that offers an inpainting engine for image editing. It is used to perform tasks such as correcting imperfections, removing unwanted elements, or creatively altering images. The software is user-friendly and provides multiple tools and settings to achieve the desired image modifications.

πŸ’‘Stable Diffusion

Stable Diffusion is an AI model used for image generation. The video discusses how it can sometimes produce images with minor imperfections, such as incorrect eye color, which can be addressed using inpainting techniques within Fooocus. Stable Diffusion is known for its ability to create detailed images but may occasionally require manual adjustments for finer details.


In the context of image inpainting, a mask is a tool used to select specific areas of an image for modification. The mask acts as a guide, telling the software which part of the image to alter. It is crucial for inpainting as it allows for targeted changes without affecting the rest of the image.

πŸ’‘brush size

Brush size refers to the dimensions of the tool used to paint or mask areas in image editing software. In inpainting, adjusting the brush size allows users to make precise edits or cover larger areas, depending on the required changes.


In the context of AI image generation, a prompt is a set of instructions or descriptors that guide the AI in creating an image. Prompts can include details like color, object, or other specific characteristics that the user wants to be reflected in the generated image.


Outpainting is a feature in image editing software that extends the borders or edges of an image, creating new content that matches the style and content of the original image. It is different from inpainting, which focuses on altering existing parts of an image.


Zoom in image editing refers to the ability to magnify a portion of the image to work on specific details. This feature is useful for precise inpainting, as it allows users to focus on small areas and make detailed adjustments.

πŸ’‘Improve Detail

Improve Detail is a function within image editing software that enhances the clarity and sharpness of a selected area. It is particularly useful for refining small elements within an image that may not have come out perfectly in the initial generation or inpainting process.

πŸ’‘modify content

Modify content is an inpainting method that allows users to make significant changes to the content of an image, such as adding or changing objects. This approach is different from standard inpainting, which is more focused on minor corrections or improvements.


Experimentation in the context of the video refers to the process of trying out different settings, tools, and techniques within image editing software to achieve desired results. It emphasizes the importance of testing various options to learn and find the best approach for image manipulation.


Fooocus offers a straightforward and powerful inpainting engine for regenerating parts of an image.

Inpainting is useful for correcting imperfections, removing unwanted elements, or creatively altering parts of an image.

With AI image generation, minor imperfections can be fixed using inpainting without starting from scratch.

The 'Input Image' checkbox must be checked to access inpainting features in Fooocus.

The 'Inpaint or Outpaint' tab is where users begin the inpainting process.

Inpainting allows you to fix specific parts of an image, such as changing eye color from blue to green.

Users can zoom in, change brush size, and use tools like 'undo' and 'clear' while inpainting.

The 'generate' function applies the inpainting to the selected area based on the original prompt.

The first time 'generate' is used, it may take extra time to download necessary models.

Upscaling the image may be required before applying inpainting, depending on the task.

Inpainting can be used to change various aspects of an image, such as hair color or clothing details.

The 'Improve Detail' feature enhances the details of the masked area for better results.

Inpainting can be applied to real photographs as well as generated images.

The 'modify content' method under inpainting is useful for making significant changes to an image.

Experimentation is key to achieving desired results with inpainting and AI image generation.

The video provides a basic introduction to inpainting with Fooocus, with more advanced techniques to be covered in future videos.