# For PyTorch and NumPy input
mask = 1 - mask
```  
</Tip>  
For inpainting, you'll need the original image, a mask of the area to replace in the original image, and a text prompt of what to inpaint. Load the prior pipeline:  
<hfoptions id="inpaint">
<hfoption id="Kandinsky 2.1">  
```py
from diffusers import KandinskyInpaintPipeline, KandinskyPriorPipeline
from diffusers.utils import load_image, make_image_grid
import torch
import numpy as np
from PIL import Image