How to Create Optical Illusions with Stable Diffusion (Squint Images)

Updated
How to Create Optical Illusions with Stable Diffusion (Squint Images)
Discover the magic of Stable Diffusion as we guide you through creating captivating squint images with AI. Get ready for artistry like never before!

1. Introduction

Step into the mesmerizing world of optical illusions created through the magic of AI and Stable Diffusion. In this tutorial, we'll guide you through the process of creating squint images and hidden text using Stable Diffusion and ControlNet. Whether you're looking to transform stunning logo art, conceal text, or create mind-bending squint images, this tutorial is your gateway to exploring the captivating realm of technology-infused artistry.

2. Requirements: Optical Illusion Images

Stable Diffusion Installation

To get started on this creative journey, you'll need to have Stable Diffusion installed on your system. If you haven't installed it yet, we've got you covered. You can find a comprehensive installation tutorial right on our website.

How to Install Stable Diffusion on Windows

ControlNet & Models

Next, you'll need to download and install ControlNet, a crucial component for managing image transformations, if you haven’t installed ControlNet yet you can watch our ControlNet Installation video.

Lastly you will need the QR Code Monster model. Go to the Hugging Face QR Code monster website and download “control_v1p_sd15_qrcode_monster.safetensors” & “control_v1p_sd15_qrcode_monster.yaml” how-to-create-squint-images-with-stable-diffusion-controlnet-models.webp Once downloaded, place the models in the following folder location: "stable-diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\models”.

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

3. Image Preperation

Now, let's prepare the image that will be the canvas for our optical illusion. This technique is versatile and can be applied to various elements, including logos, pictures, and text.

Images

For images, it's recommended to convert them into high-contrast black and white pictures. However, it's not mandatory to strictly transform them into black and white images as you will see in the examples later on.

Logos & Text

When working with logos and text, it's essential to have a black logo/text on a white background. This combination provides Stable Diffusion with the ideal contrast and clarity to perform its magic, ensuring the optical illusion achieves the desired effect.

Examples of Black & White Images

how-to-create-squint-images-with-stable-diffusion-black-white.webp

4. Stable Diffusion Settings (Txt2img)

Now that we have our black and white canvas ready, let's proceed with creating the optical illusion. This technique works seamlessly with various elements, allowing you to experiment with logos, pictures, and text.

Once Stable Diffusion has been accessed, proceed to the 'txt2img' tab, select your favorite checkpoint and write your prompts. I used RealisticVision and Dreamshaper as my checkpoints.

Now adjust the following settings:

  • Sampling method: DPM++ 2M Karras or Euler a.
  • Sampling steps: 30 or higher
  • Width & Height: Ensure that you maintain the same aspect ratio as your canvas.
  • CFG Scale: 4 to 8

Next up, make sure you enable Hires. Fix, this will ensure a smooth transition between your canvas and the generated image.

  • Upscaler: I select 4x-UltraSharp, this is not a default option but it’s recommended to use with the RealisticVision checkpoint. Alternatively you can use ESRGAN_4x.
  • Hires steps: 20 or higher
  • Denoising Strength: 0,4 - 0,6
  • Upscale by: 1.1 - 2

how-to-create-squint-images-with-stable-diffusion-stable-diffusion-settings.webp

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

5. ControlNet Settings (Txt2img)

Open up ControlNet and upload your prepared image. Here we only need to adjust a few settings. First off, don’t forget to enable ControlNet by checking the box.

  • Pixel Perfect: Yes
  • Preprocessor: None or Invert, you can use both and see what you like best.
  • Model: control_v1p_sd15_qrcode_monster
  • Control Weight: 0.7 - 2, You can play around with this value. The lower the value the harder it will become to see your image, making you really need to squint your eyes!

how-to-create-squint-images-with-stable-diffusion-controlnet-settings.webp

6. Examples: Optical Illusion Images (Squint Images)

Let's take a look at some examples of optical illusions created using this versatile technique. Each illusion offers a unique perspective and demonstrates the creative potential of Stable Diffusion with different elements.

Images

how-to-create-squint-images-with-stable-diffusion-images.webp

Logos

how-to-create-squint-images-with-stable-diffusion-logos.webp

Text

how-to-create-squint-images-with-stable-diffusion-subscribe-squint-image.webp

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

7. Conclusion

In conclusion, the fusion of AI, Stable Diffusion, and ControlNet allows you to craft captivating optical illusions with logos, pictures, and text. Throughout this tutorial, you've learned how to transform various elements into mind-bending creations. By understanding the settings and experimenting with control weights, you can achieve unique results. The possibilities are endless, and you're now equipped to explore the world of optical illusions with confidence and creativity.

Frequently Asked Questions

To make a picture black and white in Photoshop, follow these steps:

  • Open your image in Photoshop.
  • Go to the "Image" menu at the top.
  • Choose "Adjustments."
  • Select "Desaturate" from the options. This will instantly remove the color from your image, turning it into a grayscale or black and white image.

Alternatively, you can also use the "Black & White" adjustment layer for more control over the conversion. Here's how:

  • Open your image in Photoshop.
  • Go to the "Layer" menu at the top.
  • Choose "New Adjustment Layer" and then "Black & White."

In the Black & White adjustment panel that appears, you can adjust the sliders for different color channels to fine-tune the black and white conversion to your liking.

Once you're satisfied with the result, click "OK."

While the tutorial primarily focuses on black and white transformations, you can adapt the technique to color images by adjusting the settings and exploring color-based effects. Feel free to experiment and share your findings.

Control Weight' is a critical parameter that influences the intensity of the squint effect in your images. You can vary this setting to achieve different levels of distortion, and the tutorial provides insights into finding the right balance for your desired outcome.

We have a full tutorial on our website that guides you through the installation process, ensuring you're ready to create squint images. How to Install Stable Diffusion on Windows

character creation tool card

AI Image Generation Tool

Create Your AI Images in Seconds!

News & Updates