StableSwarmUI icon indicating copy to clipboard operation
StableSwarmUI copied to clipboard

X-only tiling?

Open nbs opened this issue 1 year ago • 3 comments

I'd love to be able to specify only to do the seamless tiling on the X-axis only. If you need a use case, think backgrounds for things like a platformer game, something horizontally scrollable but doesn't try to put the ground in the sky as to be Y-tileable too.

Thanks!

nbs avatar Mar 13 '24 04:03 nbs

This is an interesting feature request and a cool idea, however I'm not sure how to actually achieve it in practice - internally tiling comes down to setting pytorch Conv2d padding mode to circular, and they don't appear to have any form of "x_circular but y none" type of options, nor any obvious way to inject that short of... maybe totally replacing the Conv2d code with alternate code that call's a custom pad?

mcmonkey4eva avatar Mar 13 '24 10:03 mcmonkey4eva

Thanks for your response! I've heard as much, from asking around the sdnext repo.

I think InvokeAI is the only project that has figured out an implementation:

image

https://github.com/invoke-ai/InvokeAI/blob/main/invokeai/backend/stable_diffusion/seamless.py

Of course I'd prefer to use Swarm though.

The dream is actually to axis-tile AND upscale at the same time, as seen in this longstanding issue in AUTO1111 there's a few of us wanting it:

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3590

I imagine this is very low on the priority list but thanks for your consideration nonetheless!

nbs avatar Mar 14 '24 00:03 nbs

Oh, yep, they do exactly what I was thinking - injecting and replacing the conv2d code with an alternate handler

mcmonkey4eva avatar Mar 14 '24 12:03 mcmonkey4eva

the seamless tileable param now has X-Only and Y-Only options

mcmonkey4eva avatar May 20 '24 15:05 mcmonkey4eva

Huge! Thank you so much. Haven't been able to test it yet but will let you know if I run into anything. Thanks again.

nbs avatar May 21 '24 08:05 nbs