Sygil-Dev / stable-diffusion

GNU Affero General Public License v3.0
1.72k stars 149 forks source link

Add tiling option #267

Closed VulumeCode closed 2 years ago

VulumeCode commented 2 years ago

Add a --tiling option parameter which patches all models to use padding_mode='circular'. This causes SD to generate tiling images natively, in one go, without extra processing.

image

image

It's a parameter because it requires the models to be reinitialized (as far as I know). It's possible to make it into a UI parameter but that would require keeping track of how the model is loaded and reload it on demand etc. Same could be done for other options like "optimized". Probably should be a separate story.

Code modified from https://gitlab.com/-/snippets/2395088

ghost commented 2 years ago

Very useful!

JoshuaKimsey commented 2 years ago

Ok, this is cool! This will help make textures for scenes easily.

Trimad commented 2 years ago

Merging this should be a no brainer. Very cool.

Calandiel commented 2 years ago

This would be great for adoption in video games. Tiling textures are often a necessity.