It would be great to add input parameters to the current SD cli to specify an input and mask file to run the inpainting. For example:
./bin/sd -m ../models/sd-v1-4.ckpt -p "a lovely dog" --image ../input/alovelybench.png --mask ../input/alovelybench.mask.png
The input image:

The input mask:

The output:

Here some references:
- https://stable-diffusion-art.com/inpainting_basics
- https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/inpaint