This is a repository for image inpainting with a Stable Diffusion finetunes which weren't trained on inpainting task. Code is based on pipeline from huggingface 🤗 Diffusers library.
It is a simple learning project, it is better to use StableDiffusionInpaintPipeline or StableDiffusionInpaintPipelineLegacy from 🤗 Diffusers library.
- Create a virtual environment:
virtualenv -p python3.9 .venv && source .venv/bin/activate
- Install all requirements:
pip install -r requirements.txt
- Use the project 🎉
To run use command below:
python run_simple_inpainting.py --device cuda:1 --prompt "Face of a yellow cat, high resolution, sitting on a park bench" --strength 0.95 --seed 0
This gif was created by decoding latent features at each step of the diffusion process.
- 🤗 Diffusers - Huggingface diffusion models library
- Typer - CLI framework
This project is licensed under the MIT License - see the LICENSE file for details.