AUTOMATIC1111's Stable Diffusion WebUI is one of the most powerful tools in the generative AI space. Stable Boy puts that power into GIMP 2.10 by calling into A1111 WebUI's API.
Here's a short demo video:
(Not shown: 🆕 Using rectangular selections to select the region that Stable Diffusion will process. See Usage below.)
- Clone the repo:
git clone https://github.com/tgiesselmann/gimp-stable-boy.git
- Start GIMP, open Preferences and add the absolute path to sub-folder (!)
src/gimp_stable_boy
to GIMP's plugin search path:/home/...and-so-on.../gimp-stable-boy/src/gimp_stable_boy # MacOS, Linux C:/Users/...and-so-on.../gimp-stable-boy/src/gimp_stable_boy # Windows
- Restart GIMP.
- Start A1111 WebUI with argument
--api
. It doesn't matter whether it's running on your local machine or somewhere in the cloud. - Copy-paste A1111 WebUI's URL (something like
https://abcdef123.gradio.com
) into theAPI URL
field. (For the time being you'll have to do that once for every generation option.)
Stable Boy can be found in the Stable Boy
top menu, with the following options:
- Text to Image
- Image to Image
- Inpainting
- Upscale
The minimum resolution is 512x512.
Stable Boy can open the results coming from Stable Diffusion either as new images or as new layers in the current image. Using layers is very powerful, especially when inpainting large images.
Use rectangular selections for selecting the region that Stable Diffusion will process. This makes it possible to work with images of arbitrary size. Note that the selection's width and height need to be multiples of 8. Think 512x512
, 512x768
, 1024x768
, that kinda thing.
👉 Using GIMP's fixed-size rectangular selections makes this easy.
When there is no selection, Stable Boy will process the full image. (Therefore image sizes should also be multiples of 8.)
❗️ Make sure your selected region is completely within the image.
Add a layer named Inpainting Mask
to the image (see video) and make it the top layer. Use a paintbrush and paint the region you want to inpaint with black on that mask layer. Stable Boy will automatically determine the area of the image to process.
Stable Boy will insert any generated layers under the inpainting mask layer and hide the mask layer. The mask itself remains as is.
👉 Select the mask layer and hit
DEL
to clear the mask.
Stable Boy does not have an option to choose the model. You'll have to do that in WebUI. Loading an inpainting model in A1111's WebUI is also recommended.
✅ Rectangular selections as image sources for each mode
✅ Inpainting on large images: Stable Boy determines the region to send to Stable Diffusion based on where you painted the mask
- WIP: scripts (X/Y plot etc.)
- Outpainting
- Better GUI
- Keep metadata (seed, sampler settings and such)
- Support for more options
- Better documentation
See the open issues for known issues.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. Thank you!
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Adding some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a pull request
Distributed under the GNU General Public License v3.0. See file COPYING
for more information.
Mail: torben@sdf.org
Mastodon: @torben@mastodon.sdf.org
In the end, everyone stands on the shoulders of giants.