stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

Support tiling

Open gartia opened this issue 2 years ago • 0 comments

I made a pr to ggml to add circular padding, would SD need anything else for this?

It seems like pytorch SD implementation you just replace the 0 padding with a circular method.


    def apply_circular(self, enable):
        if self.circular_enabled == enable:
            return

        self.circular_enabled = enable

        for layer in [layer for layer in self.layers if type(layer) == torch.nn.Conv2d]:
            layer.padding_mode = 'circular' if enable else 'zeros'

Is 0 padding already implemented in SD cpp? if so would it also just be this easy

There is also more advanced methods such as torus wrapping the tensor, but i would like to just test this before something like that

gartia avatar Dec 07 '23 03:12 gartia