Fun with optical illusions in Stable Diffusion AI

Also called squint images these images appear as one thing from a distance but up close they reveal something completely different

Vibeke Bertelsen (Udart)
3 min readSep 29, 2023
Do you see the message?

Have you seen those pictures online that change when you squint or step back? Close up, they might look like a scene, but from far away, they turn into shapes like spirals or squares or words. Cool, right?

One way to create these pictures is with the AI art tool tool called Stable Diffusion. As of now, it’s the only AI tool that can make these cool images. If you’re already have access to Stable Diffusion, hold on; we’ll get to the how-to part soon. If you haven’t tried it yet but want to, here’s a link to sign up and try Stable Diffusion for free. Let’s dive in!

Getting started with Stable Diffusion

After signing up you’ll be presented with some options. Just select A1111 and the Fast option. Click launch and wait a few minutes for it to start up.

Getting the settings right

Stable Diffusion settings marked with red. Leave the others as they are

Once inside Stable Diffusion you need to start out with a few settings.

  • You should select a checkpoint which is a specific flavour of Stable Diffusion. I selected protogenX53Photorealism_10.safetensors. But a lot of the other checkpoints should work as well
  • Write your prompt. I wrote ‘a medieval village scene with busy streets and a castle in the distance’
  • Set the Hires. fix in order to scale up the final image.
  • Set Hires steps to 30
The contents of the ControlNet tab
  • Find the controlNet tab towards the bottom of the page and open it
  • Find the ‘hidden image’ to use such as a spiral in this case and upload it by clicking ‘click to upload’ in the Single Image panel. The image could be other things such as a word. But remember to use simple shapes
  • Click ‘Enable’ to activate the controlNet
  • Select the right model. Find the QRCode_Monster model. In my case. the full name is control_v1p_sd15_qrcode_monster
  • Adjust the control weight between 0–1. Where 1 means a very visible ‘hidden image’. Try 0.5 for this spiral image
  • Now you’re ready to scroll up and hit the orange Generate button

Voila, the final image:

Fun with spirals

Subscribe to get more ideas for fun and interesting things to try with AI

--

--

Vibeke Bertelsen (Udart)

Vibeke Bertelsen is a digital artist and creative coder living in Copenhagen, Denmark.