Tileable texture from Stable Diffusion #224
Replies: 7 comments 3 replies
-
I simply inserted this partial code from here in line 34 of optimized_txt2img.py and got Tileable texture scripts for stable-diffusion codebase. (I'm new to python so I could be wrong on this.) def patch_conv(klass):
init = klass.__init__
def __init__(self, *args, **kwargs):
return init(self, *args, **kwargs, padding_mode='circular')
klass.__init__ = __init__
for klass in [torch.nn.Conv2d, torch.nn.ConvTranspose2d]:
patch_conv(klass) |
Beta Was this translation helpful? Give feedback.
-
https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html from the documentation, the "padding mode" have several options:
the default mode is |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, the code KawaNae has only works if it's done before model load as the padding method is used during initialization of those networks and changing it afterwards seems to require iterating through the already loaded model, saving the weights of and recreating the conv2d, then restoring the weights or completely reloading the model after running the patch code. |
Beta Was this translation helpful? Give feedback.
-
I would also love to see Tileable textures implemented, as it is now i go back and forth between implementations since i need that feature. |
Beta Was this translation helpful? Give feedback.
-
i really want to have that too! |
Beta Was this translation helpful? Give feedback.
-
I managed to implement tileable textures for my implementation of a Blender add-on using Stable Diffusion here. It seems pretty straightforward. There are two options:
|
Beta Was this translation helpful? Give feedback.
-
Hi. I was just wondering if anyone has successfully implemented tileable outputs with SDXL 1.0? Trying to figure it out so we can implement it for an app via API. Thanks in advance for any insights. |
Beta Was this translation helpful? Give feedback.
-
Someone requested Tileable textures be implemented, this code is for diffusers codebase, needs implementing for stable-diffusion codebase
Beta Was this translation helpful? Give feedback.
All reactions