Skip to content

Inpainting

Video Lecture

Section Video Links
Inpainting Inpainting Inpainting 

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.
Video Timings 00:00 Introduction to inpainting and setting up the workflow
00:25 Creating and editing image masks in ComfyUI
01:30 Initial inpainting using Stable Diffusion 1.5
02:10 Downloading and installing the dedicated inpainting model
03:00 Improved inpainting results; understanding 'grow mask'
04:45 Applying inpainting for old photograph restoration
06:20 Iterative mask adjustments for refined image restoration

Description

Inpainting in AI image generation refers to the process of filling in or modifying specific parts of an image using a generative model.

You provide a base image with a mask that indicates the area to change, and a prompt describing the desired content to replace it with.

Inpainting is useful for more precision when removing objects, changing details, or even restoring damaged images.

Now, we can use any model for generating the new replaced content, but if you want the new content to blend in seamlessly in a similar style and context, then we can use a specific model for this.

Download the 512-inpainting-ema.safetensors (huggingface) checkpoint model and save it into your ComfyUI checkpoints folder.

You can use one of your own images for this lesson. Make sure it is 512x512 since the 512-inpainting-ema.safetensors model is optimised to that resolution,

or you can copy/paste these images into into your ComfyUI when necessary in the video.

car on dusty road

A photo that needs restoration

Troubleshooting

Refresh Node Definitions Option Missing

In ComfyUI 0.3.5, the option to Refresh Node Definitions was moved from the Edit menu item to the Nodes menu.

512-inpainting-ema.safetensors (huggingface)