This AI tool can generate super cool optical illusions from simple text descriptions.
Just when the AI hype seemed to feel like a leisurely local train ride (I mean slow), a fresh, trending AI tool reignited my excitement. The new AI tool is called Illusion Diffusion and can generate optical illusion images from an image pattern.
Take a look at some of the sample images that are trending on Twitter.
The easiest and cheapest way to try this AI tool is through HuggingFace. Simply create an account and go to the Illusion Diffusion space.
There might be a long queue due to the high number of users concurrently using the app. I suggest you duplicate the space before generating images.
Let’s try an example with this prompt:
Prompt: A secluded courtyard of a Roman villa during the Renaissance era, with ornate sculptures, a central fountain, and ivy-covered walls.
How cool is that?
Here are more examples:
Prompt: The heart of a cyberpunk city, modeled after a Roman forum, illuminated by neon signs in Latin, with hovercrafts zipping between ancient columns adorned with digital screens.
Prompt: Ancient, gnarled trees with clock faces naturally embedded in their trunks, their hands moving ever so slowly.
Prompt: beautiful and immersive magical town, magical buildings, bioluminescent forest surrounding, gentle rivers flowing through town, visual novel key visual, award — winning digital art on pixiv, trending on artstation — highly detailed, hyperrealistic, unreal engine 5, in the style of kingdom hearts
Also, you are not limited to these spirals and checker box patterns because you can use any pattern you want. Take a look at this incredible example with the Fusion Art AI tool.
Remember, you’re not confined to spirals or checkerboard patterns. Your creativity is the limit!
Illusion Diffusion uses ControlNet for Stable Diffusion, particularly the Monster Labs image model. ControlNet allows you to copy compositions or human poses from a reference image.
If you want to know more about the backend implementation, you can reach out to the original creator, MrUgleh.
If you are a developer and are interested in creating an app around this AI tool, you can check out the HuggingFace API documentation.
Use the gradio_client Python library or the @gradio/client JavaScript package to query the demo via API.
import { client } from "@gradio/client";const response_0 = await fetch("https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png");const exampleImage = await response_0.blob();const app = await client("https://ap123-illusiondiffusion.hf.space/");const result = await app.predict(3, [    "Howdy!", // string  in 'Prompt' Textbox component   exampleImage,  // blob in 'Illusion Diffusion Output' Image component ]);console.log(result.data);
I did a quick check and found several web apps offering similar tools, trending on platforms like Twitter and Product Hunt.
Okay, that’s about it. What do you think of this AI tool?
I am incredibly excited to see how people continue to use cutting-edge AI technologies in new and creative ways.
I can imagine several useful applications for Illusion Diffusion, such as:
The possibilities are endless; you just need to let your mind wander to create some truly amazing artwork.
‍
Software engineer, writer, solopreneur