# Use Machine Learning for Making Birthday Cards!
Date: 2024-02-23
Tags: Birthday Cards, DALL-E, Stable Diffusion, Text to Image

![AI-generated image of a woman in an Indian sari with a birthday cake in the night sky under a full moon](/assets/images/2024/02/e75c159a-69db-479c-92f5-ab1f19defea1.jpg){:w="400"}
_AI Prompt: “a woman in an Indian sari with a birthday cake in the night sky with a full moon"_

They say that a handmade card is always much better than the ones from Hallmark, but I often found that the beautiful, intricate, and most importantly, **customized** cards I wanted to make were a bit too difficult for my un-artistic hands :D.

So came my savior – stable diffusion (and other text-to-image models)!

Stable diffusion is a kind of text-to-image model, where given a prompt, it will create an image (from scratch) based on it. The model works by taking an array of randomized pixels (analogous to a blank canvas) and then over multiple passes, makes adjustments to “paint” the picture. (Expect an ML Club video on this!)

**Pro tip:** some interfaces allow you to also give a *negative prompt* along with the original prompt. Like the name suggests, the negative prompt tells the model what *not* to do. If the result the model gives you something you do not like, consider putting it in the negative prompt and running the model again. (**generating nice images takes many tries – I have had to try as much as 19 times!**)

There are also models like [DALL-E by OpenAI](https://openai.com/dall-e-3) and [Dreamstudio service](https://beta.dreamstudio.ai) (created by the makers of Stable Diffusion).

![AI-generated image of an air traffic control tower with balloons and confetti in the sky](/assets/images/2024/02/943502_Air-traffic-control-tower-with-planes-dropping-con_xl-1024-v1-0.png){:w="550"}
_AI Prompt: “An air traffic control tower with balloons and confetti in the sky."_

I asked Dreamstudio to make this image for my grandpa, who is an retired air traffic controller who served in the Indian Air Force, to add to his birthday card.

![AI-generated image of a birthday party scene styled after Minecraft](/assets/images/2024/02/907271_birthday-party-in-minecraft-players_xl-1024-v1-0.png){:w="550"}

I also asked Dreamstudio to make this image for my friend, who (like me) is a huge Minecraft fan, for his birthday card!

**Feel free to take this as inspiration for your card-making endeavors!**
