The OpenAI DALL·E 2 Model
-
Introduction
DALL·E 2 is an AI model created by OpenAI. It can generate high-quality images based on the user’s text input (the “prompt”).
For example, if your input is “a bowl of soup that is also a portal to another dimension, digital art”, the output may look like this:
You can think of DALL·E 2 as a master painter that will paint anything based on your specific request.
The OpenAI DALL·E Block
To use the DALL·E 2 model to generate an image, you can use the following reporter block in the “AI” category:
The first input is your request, up to 1000 characters. We’ll discuss how to write such requests later.
The second input specifies the size of the image to be generated, which can be 256 by 256, 512 by 512 and 1024 by 1024. Note that the larger the image, the longer it will take to generate it.
After you run the block above, it will normally take 3 to 5 seconds to generate the new image, and the URL of that image will be the output of this reporter block. Note that this block is under a rate limit for non-premium users, which means the waiting time may be longer for them.To display the generated image, you can add it as an image to the stage like this:
The Older Version of This Block
The previous version of this block is a stack block, which has been retired:
Sprite Costumes
You can not only generate images for background, but also costumes for sprites. For example, with the prompt of “a cute singing dog cartoon, full body view, white background”, you get a costume image like this:
Copyright of the Generated Image
The image you generate is guaranteed to be unique, and you have full copyright to it. That means you can use it in your projects, and you can even sell it if you can find a buyer.
However, if you choose to share the project that contains this image, then others will gain the right to use your image so long as they give credit to you.
How to Write Great Text Prompts
With the help of DALL·E, you can become a great 2D artist even if you don’t know how to paint. All it requires is the ability to compose a great text prompt that’s creative and accurate.
It takes a lot of practice to become really good at using DALL·E 2 to paint. In a way, it is similar to programming: you have to have a creative idea, then you need to be able to express that idea as a text command that the DALL·E 2 model can understand and execute.
Below are some useful tips for you:
Tip 1 - Learn from Examples
You can review images generated by others and the text prompt they are using. That’ll help you learn how to write your own prompt. For example, https://lexica.art is a great website with a lot of example images and their prompts.
Tip 2 - Try “Impossible” Combinations
The DALL·E 2 model is especially good when painting things that do not exist. If you combine some things or concepts that are usually not associated with each other, you would get some very interesting results. Here are some examples:
“a sports shoe made of watermelon”
“a dog taking a cooking class, photo-realistic, highly detailed”
Tip 3 - Give More Details
Every word in your text prompt matters. The more details you provide, the more likely for the DALL·E 2 model to “understand” what you are looking for.
For example, if your text prompt is “a beautiful beach”, you would get a fairly ordinary beach picture:
However, if your prompt contains much more details, such as “Beach paradise, concept art, low angle, high detail, warm lighting, volumetric, god rays, vivid, beautiful, huge scene”, you will get a much more unique result:
Of course, you do need to know some special terms used to describe a painting or object. For example, “volumetric” means “giving a sense of three dimensions”.
For another example, if your prompt is “a city on Mars”, this is what you will get:
If you add more details, such as “a city on Mars, futuristic, highly detailed, sci-fi, beautiful, warm color, peaceful, photo-realistic, vast ground”, you will get a result like this:
Tip 4 - Keep Trying
It is very likely that you do not get the perfect image you are expecting. When that happens, the simplest thing you can do is try again. You don’t even need to change the text prompt, since every image is randomly generated.
Of course, you may want to change the text prompt slightly as well, such as adding, changing or removing some words. Try to make small changes each time, so that you can view the corresponding change in the resulting image.
Tip 5 - Don’t Expect Beautiful Faces
The DALL·E 2 model will not generate good-looking human faces.
For example, for a prompt like “a beautiful face full view photo realistic”, you may get faces like these:
This is intentional since the creators of the DALL·E 2 model do not want the model to be used to impersonate real people.
-
Nice! This thy help me alot!