Trending right now there is a who flurry of images being generating using spiral optical illusion that is embedded inside the image generated using stable diffusion. The result looks quite intriguing and this is not just limited to spirals you can use any other kind of shapes as you will discover in this post.

What do you need?

You need to be running your own local or hosted Stable Diffusion instance. For local instance you can follow these posts or SDXL and for hosted instances follow this post

You also need to be running a ControlNet extension inside of Stable Diffusion webui which is quite easy follow this post if you are new to it. Next, download this ControlNet model called “Controlnet QR Code Monster v2 for SD 1.5“. Place the .safetensor file in the “models/ControlNet” folder.

The original model was designed to help create cool look QR codes using this model. But this technique I’ve covered in the past using another ControNet model, which you can explore here.

However let’s continue with this spiral optical illusion and how we will create the image.

Image Generation

The process is actually quite straight forward and we will following the steps using Automatic1111 (v 1.6.0) which is the WebUI interface for Stable Diffusion.

Follow these steps to setup and generate your own images:

  • Enter your positive and negative prompt. For example: a medieval village scene with busy streets and castle in the distance
  • Enable Hirex.fix so that your image is upscaled which will bring to life the illusion and produce a higher resolution image. I used steps:30 and denoise strength:0.7 with upscale by 2
  • Adjust the CFG Scale depending upon your taste, I suggest between 8 and 10.5. Experiment with different values.
  • Open up the ControNet panel (you will see this if you have ControlNet extension installed, read this to learn how) and make sure you check the Enable button. This is a rookie mistake that many people make…they setup all the settings but then forget to enable it and wonder why it didn’t work.
  • Load the image in Single Image section or draw a spiral if you can. I found a spiral vector image (PNG) and use that. You can find many images online just google them.
  • Next select the Model “control_v1p_sd15_qrcode_monster” from the dropdown. You should have this download if you read all the instructions above.
  • Control Weight should be set between 0.5 to 0.75 as you don’t want the vector image to overpower the result. You want the affect to be subtle which draws the viewer in.
  • Click Generate to generate you image. And that’s all there is to it!

Now that you have the basis of this and its working well, you can experiment with various other vector PNG images that you can feed to ControlNet and enjoy the results it produces.

You can create images in different aspect ratios and using explore their results.

Why only just stick to landscapes, you can explore portraits and other abstract creations. Let your imagination run wild and get creative with these images.

Conclusion

Yet again the world of AI keeps surprising and intriguing us where the usage of tools developed are endless. Something that was designed originally for QR code generation can now be used for some more amazing and intriguing images as well.

Share your images and tag me @harmeetgabha on 𝕏, as I’d love to see what you create. You can also find me on other socials with the same handle. If you liked this tutorial I suggest you share it with your friends and spread the word.

If you'd like to support our site please consider buying us a Ko-fi, grab a product or subscribe. Need a faster GPU, get access to fastest GPUs for less than $1 per hour with RunPod.io