Skip to content

Stable-Diffusion-webui 的img2img通过Script生成随机大小的马赛克拼图

Notifications You must be signed in to change notification settings

ZhianLin/img2mosaic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

img2mosaic

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 изображение изображение

Installation & usage

С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 factor slider will enlarge your image that many times before cutting it.
  • Use the standard Width and Height sliders 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 seeds determines 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 seeds is set.
  • Set Tile border width to 0 to completely disable tile borders

Examples

grid-0386 grid-0384 grid-0382 grid-0383

Credits

The code of the method of cutting and assembling the mosaic is written using the GPT-3 Codex according to my instructions

About

Stable-Diffusion-webui 的img2img通过Script生成随机大小的马赛克拼图

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%