arcanite24 / img2tiles

90 stars 8 forks source link

Tile borders settings, autosave result, seed randomisation #1

Closed 1ort closed 2 years ago

1ort commented 2 years ago

Added a setting for the width and color of the tile frame for greater aesthetics, the final result is now saved in the txt2img-grids folder.

Known issue: border width is not always pixel perfect due to tiles overlapping each other with a slight overlap.

I don't know what to do with the border around the final grid. At the moment, due to the way the frame is drawn, it is approximately twice as thin as the inner

arcanite24 commented 2 years ago

Looking good! @1ort , let me know when ready for review

1ort commented 2 years ago

A fixed seed in some cases gives out a strong image repetitiveness, especially if the tiles of the original image are similar in color.

The "Use -1 for seeds" checkbox avoids this. Examples below: test source,

grid-0186 checkbox off,

grid-0185 checkbox on

1ort commented 2 years ago

@arcanite24 That's all the code changes I'd like to make for today. I tested all the introduced features and did not find problems with the script, except for the minor ones related to the width of the frames, which I described above Thanks

upd. Please let me know if I should update the README with new features and examples or if you can handle it yourself

arcanite24 commented 2 years ago

Great work @1ort ! README changes would be awesome describing your changes and updating the examples

1ort commented 2 years ago

I was forced to close this pull request because the script doesn't work as it should in most of my tests. On any pictures except 512x and on any tile side sizes except 1x1.

I will be rewriting the script from scratch, using SD_upscale as the basis, so all my changes at the moment do not make sense

JLansey commented 2 years ago

I've been playing around with this - and think it would be useful to be able to manually set the seeds for each image. This would be a way for you to keep variations that you like (without using a separate photo editor). Not sure if you have a better way to do this - or a photo editor that makes this easier.

SMUsamaShah commented 2 years ago

@1ort Sorry for off-topic question but what was your prompt for above image.

BTW, saw your PR after submitting mine which simply only increments the seed for each tile.