Automatic1111' Stable Diffusion webui custom script to generate mosaics from images. The script cuts the image into tiles and processes each tile separately. The size of each tile is chosen randomly

Сlone or download this repo and put the img2mosaic.py file in a /scripts folder of your webui base dir.
After launching the interface, select img2mosaic from the list of scripts on the txt2img tab.
- The
Init image resize factorslider will enlarge your image that many times before cutting it. - Use the standard
WidthandHeightsliders to set the minimum tile size after slicing. Due to the peculiarities of the slicing algorithm, each tile will be larger than the specified size, so do not be afraid of low values Use -1 for seedsdetermines whether the seeds for each picture will be different or not.- If you specify a seed in the standard interface field, it will be used when cutting the image into tiles. Thus the shape of the mosaic will be the same across generations, even if
Use -1 for seedsis set. - Set
Tile border widthto 0 to completely disable tile borders
The code of the method of cutting and assembling the mosaic is written using the GPT-3 Codex according to my instructions



