You can also chain an inpainting pipeline before another pipeline like image-to-image or an upscaler to improve the quality.  
Begin by inpainting an image:  
```py
import torch
from diffusers import AutoPipelineForInpainting, AutoPipelineForImage2Image
from diffusers.utils import load_image, make_image_grid