How to make Seamless Textures with AI (Stable Diffusion)

Updated
How to make Seamless Textures with AI (Stable Diffusion)
Unleash the creative potential of AI and Stable Diffusion as we delve into the art of crafting stunning Seamless Textures effortlessly.

1. Introduction Stable Diffusion

Creating seamless textures has always been a labor-intensive process requiring artistic skill. However, with Stable Diffusion, an AI technique known as text-to-image (txt2img), the landscape has changed. By translating text into realistic, boundary-free images, Stable Diffusion revolutionizes texture creation, making it accessible and breathtaking.

Stable Diffusion employs deep neural networks to comprehend texture patterns, colors, and structures. In this tutorial, we'll harness its power using the text-to-image tool to craft stunning seamless textures. Simply by providing keywords or phrases, we can generate high-resolution textures that align with our vision.

In this tutorial, we'll explore the step-by-step process of leveraging Stable Diffusion's text-to-image tool to unlock your artistic potential and enhance your digital projects. Let's embark on this exciting journey into AI-powered texture creation and witness the transformative capabilities of Stable Diffusion.

2. Stable Diffusion txt2img Settings

To employ this technique, we will utilize Stable Diffusion's txt2img function. If you haven't installed Stable Diffusion yet, you can find a step-by-step guide below.

How to Install Stable Diffusion on Windows

To start off, head to the Stable Diffusion txt2img tab. Select the checkpoint you want to use, for this example I used fantasticmix, keep in mind this model uses a VAE, if you don’t know what a VAE is check out our tutorial about VAE's

how-to-make-seamless-textures-in-stable-diffusion-checkpoint.PNG

Once you've selected your checkpoint you want to write your prompt, this is a description of the output image you will get. It helps to put the word texture in your prompt. In this example I used: (best quality), (high quality), old russian wallpaper texture, daisies, flowers, blue, yellow,
In the negative prompt you want to write down the things you don’t want to see in the generated image. I wrote down: (worst quality:1.2), (low quality:1.2), (lowres:1.1) You can write down whatever you want, let your imagination go wild.

Now you’re almost ready to generate your texture, there are a few things you can change.

  • Sampling method: I recommend DPM++ 2M Karras for the sampling method as it is relatively fast and gives a good quality. However you can try any you like.
  • Sampling steps: use a minimum of 20 steps, 25-30 is recommended.
  • Tiling: Make sure Tiling is enabled. This is important to get seamless textures.
  • Width & Height: I recommend a width and height of either 512 or 768 pixels. Most checkpoints are trained on this resolution.
  • CFG Scale: I usually keep this at 7 for a balanced output, you can play around with it but don’t use too high values. Keep a maximum of 15.

how-to-make-seamless-textures-in-stable-diffusion-tiling.PNG

Now you’re all ready to go, just press “generate” and let the magic happen.

transform-images-into-stunning-ai-art-with-stable-diffusion-art-ai-art-img2img-generate.png

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds
20% bonus on first deposit

3. Stable Diffusion Output

The outputs are saved by default in the outputs folder followed by what type of generation you used and the date the image was created, in this example the output folder can be found here: Stable-diffusion-webui\outputs\txt2img-images\2023-07-06

Here are 2 examples i created with the settings I used.

Example 1

Tiled how-to-make-seamless-textures-in-stable-diffusion-texture1.webp

Example 2 how-to-make-seamless-textures-in-stable-diffusion-texture-example2.webp Tiled how-to-make-seamless-textures-in-stable-diffusion-texture2.webp

As you can see both textures are seamless and can repeated indefinitely.

4. Upscale Your Textures

If you want to further improve your textures you can upscale your textures by pressing the send to img2img button beneath your generated image.

Here you want to use the Ultimate SD upscale script to upscale your image. If you don't have this script installed you can find a step-by-step guide on how to install it down below:

High-Quality Upscaling Made Easy in Stable Diffusion

If you have the script installed you want to copy the highlighted settings below, leave the rest default. You can play around a little with the following settings:

  • Sampling Steps: 20-30 is usually good enough, if you want more detail you can set this even higher.
  • Denoising strength: I recommend 0.05 - 0.2, don't go too high as it will alter the image too much and it might end up not being seamless anymore.
  • Upscaler: You can also change the Upscaler if you do not have the 4x-UltraSharp, ESRGAN_4x is a good alternative.

how-to-make-seamless-textures-in-stable-diffusion-upscale.PNG

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds

5. Normal Map & More

When creating textures, it's usually beneficial to generate additional maps to enhance the visual effect. One important map to consider is the normal map, which adds depth to the texture. Luckily, there's a handy online tool called "Normal Map Online" that can generate a normal map from an image. So, if we take the image we created earlier and upload it to the tool, it will automatically generate a corresponding normal map. We have the freedom to adjust the strength of the normal map, allowing us to fine-tune the level of depth in our texture according to our preferences. This online tool even let's us create Displacement, Ambient Occlusion and Specular maps.

how-to-make-seamless-textures-in-stable-diffusion-normal-map.webp

6. Conclusion

In conclusion, this tutorial has explored AI-powered texture creation using Stable Diffusion. By leveraging Stable Diffusion and it's text-to-image tool, we can effortlessly craft stunning seamless textures.

Throughout the tutorial, we learned to utilize Stable Diffusion's txt2img function, select checkpoints, and write effective prompts to generate high-resolution textures. Tiling and adjusting settings like sampling method, steps, width, and height are crucial for optimal results.

Additionally, we discussed upscaling textures using the Ultimate SD upscale script, enhancing texture quality while maintaining seamlessness. Generating additional maps, such as normal, displacement, ambient occlusion, and specular maps, further enhances the visual effect of our textures.

By embracing AI and Stable Diffusion, we unlock artistic potential and elevate digital projects with impressive seamless textures. Now, unleash your creativity and embark on your own exciting AI-powered texture creation journey.