question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Image output tiling for seamless textures with Stable Diffusion

See original GitHub issue

Is your feature request related to a problem? Please describe. Currently there is no way to create seamless textures with Stable Diffusion, a crucial feature that is missing.

Describe the solution you’d like Something similar to this pull on the sd-webui repo: https://github.com/sd-webui/stable-diffusion-webui/pull/911

A simple argument in the StableDiffusionPipeline that would enable seamless texture generation for 3D applications.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
shirayucommented, Sep 21, 2022

FYI: In my app, I toggle to be tile-able or not after pipe loading by change padding_mode in each layer.

  1. First, save conv layers and their original padding modes
  2. Change padding mode on each generation
1reaction
anton-lcommented, Sep 21, 2022

Hi @torrinworx! As the https://github.com/sd-webui/stable-diffusion-webui/pull/911 PR suggests, you can make the Stable Diffusion models tile-able by patching the torch.nn.Conv2d before loading the pipeline:

# add global options to models
def patch_conv(**patch):
    cls = torch.nn.Conv2d
    init = cls.__init__
    def __init__(self, *args, **kwargs):
        return init(self, *args, **kwargs, **patch)
    cls.__init__ = __init__

patch_conv(padding_mode='circular')
print("patched for tiling")

Native support for tiling in diffusers is unlikely to come, as it would either be hacky, or complicate the model the model design with additional arguments 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

This Stable Diffusion Fork Can Generate Tiled Images
The completed version of the Stable Diffusion model can generate images with artificial intelligence right on your computer.
Read more >
how would you make a seamless texture generation ... - Reddit
i dont know much about writing custom code for stable diffusion but this ... -any-photo-to-seamless-texture.html on the generated images?
Read more >
[Feature Request]: Seamless texture SD upscale · Issue #3590
Proposed workflow · Upload a seamless texture to Sd upscale · Tick "tiling" field and generate · Results in an SD upscaled image...
Read more >
Seamless texture and autosave options - Lucid Creations
Now, I have used Stable Diffusion quite a bit in other environments. ... Image output tiling for seamless textures with Stable Diffusion ......
Read more >
A New Tool for Generating Seamless Textures - 80 Level
The tool is powered by Stable Diffusion and utilizes its Inpainting feature. ... Developer and AI enthusiast Travis Hoppe presented a cool new ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found