mcmonkeyprojects / SwarmUI

SwarmUI, A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
291 stars 24 forks source link

Seamless Tiling doesn't work with SD3 #38

Closed mediastacks closed 16 hours ago

mediastacks commented 6 days ago

Expected Behavior

When "Seamless tileable" option in "Sampling" is set to "true", SD3 (like any other model) supposed to generate images that can be stacked together with no identifiable seams. It works perfectly with SDXL and earlier SD versions.

SDXL image image

Actual Behavior

Regardless of prompt details, sampler methods, and most importantly, activation of "Seamless Tileable" tooggle, the resulting image is not a seamless tileable pattern, as seen below.

SD3 image (all the same parameters otherwise) image

Steps to Reproduce

Debug Logs

There are no errors, all seems normal.

Other

No response

mediastacks commented 6 days ago

BTW thank you for developing this amazing UI. I was deterred by the complexity of ComfyUI but your interface is very clean and accessible, allowing to use all the power of Comfy without necessarily dealing with nodes. And a great learning tool allowing to see exactly how things are done in ComfyUI. Just wanted to show a little bit of appreciation :)

mcmonkey4eva commented 6 days ago

Unfortunately making SD3 seamless will require a whole new trick to it - for SD1/SDXL, seamless tileable uses a conv padding alteration, but SD3 does not use conv layers at all. I believe the VAE seamless mode still works but that's only a small part of it, the mmdit doesn't have an immediately clear way to make it seamless

mediastacks commented 23 hours ago

Unfortunately making SD3 seamless will require a whole new trick to it - for SD1/SDXL, seamless tileable uses a conv padding alteration, but SD3 does not use conv layers at all. I believe the VAE seamless mode still works but that's only a small part of it, the mmdit doesn't have an immediately clear way to make it seamless

This is unfortunate. Can anything be done about this?

mcmonkey4eva commented 16 hours ago

In theory, yes.

In practice... needs somebody who understands neural network internals to spend significant time on it. Or some janked up tiled-offset hack or something.

So probably out of scope for just a Swarm feature request. If/when somebody does find a good way to do seamless on SD3, it can be added to Swarm though