Custom scripts for the stable diffusion web ui by AUTOMATIC1111
The algorithm in action:
https://www.youtube.com/watch?v=t7nopq27uaM
UI:
Download mosaic.py
and place it in the stable-diffusion-webui/scripts
folder, then restart webui.
You can find the algorithm in the img2img tab under "Scripts".
- Patches will be resized for processing from
patch size
to whatever yourwidth
andheight
settings are and then scaled back down for the mosaic. - elliptical mask shape will lead to less visible seems/patches, but requires a larger overlap in order to not produce gaps
- more overlap means more patches to process and thus longer computation
- Use preview mode to view how a single patch would look after processing, before committing the entire image.
- Use mask preview mode to check the coverage of the mask pattern for your image (white means a pixel will be regenerated, black parts of the image will remain untouched). You can combine this with the preview mode in order to examine a single mask.
- "Upscale amount" will upscale the image using bilinear upscaling before processing. For better results, I'd recommend manual upscaling with a better upscaler.