You should try to use the latest webui plugin, which seem to support the latest webui features and is updated regularly:
https://github.com/Interpause/auto-sd-paint-ext
I'm sorry for your inconvinience. I can't maintain this repo due to some personal issues.
A simple interface based on this repository: https://github.com/AUTOMATIC1111/stable-diffusion-webui
Requires Krita 5.1
If you used previous version which used conda, please make a new install. Please install it separately from webui. If you got any trouble after updating repo, please try to delete and reinstall it.
pykrita
(create it if it doesn't exist)krita_plugin
into pykrita
folder of your Krita. You should have krita_diff
folder
and krita_diff.desktop
file in pykrita folder.You need python and git installed to run this, and an NVidia video card.
You need model.ckpt
, Stable Diffusion model checkpoint, a big file containing the neural network weights. You
can obtain it from the following places:
You can optionally use GFPGAN to improve faces, to do so you'll need to download the model from here and place it in the same directory as webui.bat
.
To use ESRGAN models, put them into ESRGAN directory in the same location as webui.py. A file will be loaded as a model if it has .pth extension, and it will show up with its name in the UI. Grab models from the Model Database.
Note: RealESRGAN models are not ESRGAN models, they are not compatible. Do not download RealESRGAN models. Do not place RealESRGAN into the directory with ESRGAN models. Thank you.
model.ckpt
into webui directory, next to webui.bat
.GFPGANv1.3.pth
into webui directory, next to webui.bat
.webui-user.bat
from Windows Explorer. Run it as a normal user, not as administrator. You should run webui-user.bat from this repository, not from others.git clone https://github.com/sddebz/stable-diffusion-krita-plugin.git
cd stable-diffusion-krita-plugin
./webui.sh
If you have less then 8GB of VRAM, you should probably use options like --medvram
or --lowvram
. Look at the guide from parent repo for more information:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Optimizations
Try --medvram
first, it's not so bad for performance.
Look into parent repository https://github.com/AUTOMATIC1111/stable-diffusion-webui for instructions. This repository uses slightly changed code, but most parameters including those for low VRAM usage should still work.
Put something in your prompt and just run it. If you select some area, only it will be used.
You may use feathered selections. Selection will be converted to transparency mask afterwards. Not sure it is useful, it can be disabled on config tab.
It uses "SD upscale", that means original image is split into overlapping tiles with size 512x512. Each tile is processed with SD, then they are merged into a single out image. This algorithm is very sensitive to original img resolution. For sane processing time try to use images of size up to 1408x960 (max size for 6 tiles).
You should use low denoising strength with this mode. Think 0.1-0.2.
I'm not sure, it works correctly currently. If you think it doesn't please try webui.
It requires both image and mask. For mask this plugin uses selected layer. Just create new layer and paint with white brush. This area will be inpainted.
For inpainting to work properly you need high denoising strength. Think 0.6-0.8.
In every mode except sd upscale plugin resizes source images. First image is resized to match SD required size of 512x(512 + 64*k). Second resulting image is resized back. That means that you should be able to use plugin with image or selection of any size. But large image sizes will generally have less downscaling artefacts.
Internally plugin uses Lanczos algorithm for both downscaling and upscaling.
TLDR: use selections, with them aspect ratio is less wrong.
Plugin needs to resize image to size of (512 + 64*k)x512. That can change aspect ratio and lead to suboptimal results.
If you use selection, plugin will try to slightly increase size of an image patch, which is sent to SD. This improves aspect ratio handling quite a bit. Alternatively work with image sizes that have right aspect ratio, like 1024x1024, 1280x1024, ... like (512 + 64*k)x512.
SD upscaling doesn't have this problem at all.