blueturtleai / krita-stable-diffusion

MIT License
43 stars 3 forks source link

krita-stable-diffusion

This repository includes a Krita plugin for communication with stablehorde. Stablehorde is a cluster of stable-diffusion servers run by volunteers. You can create stable-diffusion images for free without running a colab notebook or a local server. Please check the section "Limitations" to better understand where the limits are.

This plugin is no longer actively developed.

Please check HISTORY.md for the latest changes.

https://user-images.githubusercontent.com/113246030/196197783-ee750552-b4f9-4722-8a23-0116a1674c9e.MOV

Installation

Krita

The plugin has been tested in Krita 5.1.1.

IMPORTANT: If you are running Linux, please make sure, you have webp support for Qt5 installed, as this is the image format stablehorde uses. Execute the following command to check, if it's already supported: python -c "from PyQt5.Qt import *; print([bytes(x).decode('ascii') for x in QImageReader.supportedImageFormats()])". To install it, use sudo pacman -S qt5-imageformats (Arch) or sudo apt install qt5-image-formats-plugins (Debian).

  1. Download the Krita plugin zip.

  2. Start Krita and open the "Tools/Scripts/Import Python Plugin from File" menu and select the downloaded zip. Restart Krita.

  3. You should see now the new menu item "Tools/Scripts/Stablehorde". If this is not the case, something went wrong.

Generate images

Now we are ready for generating images.

  1. Start Krita and create a new document with a size between 384x384 and 1024x1024, color mode "RGB/Alpha" (default), color depth 8bit (default) and a paint layer. The generated image will have the size of the document or is a bit smaller. Check below for an explanation.

    • Stable diffusion only generates image sizes which are a multiple of 64. This means, if your document has a size of 650x512, the generated image will have a size of 640x512.
    • The larger the image, the longer you have to wait for generation. The reason is, that all servers in the cluster support 512x512, but not all larger sizes.
  2. Select the new "Tools/Scripts/Stablehorde" menu item. A dialog will open, where you can enter the details for the image generation.

Basic Tab

Advanced Tab

Troubleshooting

Linux

Limitations

FAQ

Why is the generated image smaller than the document? Stable-diffusion only generates image sizes which are a multiple of 64. This means, if your document has a size of 650x512, the generated image will have a size of 640x512.

Will outpainting be supported? Pretty likely outpainting will be supported. This depends on which features the stablehorde cluster supports.

How do I report an error or request a new feature? Please open a new issue in this repository.