Learn all the prompt engineering basics across multiple models in one straightforward class. In less than 20 minutes of reading, you’ll prompt stunning AI images and hone a skill for the future.
Course last updated: 1 February 2023
Disclaimer: All example images are first-generation AI, however, the principles in this course still apply today.
Text-to-image AI is paving the way for a new industry of AI prompt-engineers; professionals who know exactly which words, phrases, and terms to use in their image prompts for the best results.
But what is AI prompting?
It’s important to understand that deep learning models have been made by humans, and trained on human data, in order to solve human problems. Additionally, users no longer need engineering skills or fine-tuning data skills to use large AI models; anyone with a computer can now harness AI to create images, text, and more.
Now AI generation is accessible to the public, we can start to use these models to solve problems on a smaller scale. But, if you need a set of images for a website, you need to know how to use this text-to-image AI to its full capabilities.
Machine learning research has produced a variety of AI models capable of generating original images from text prompts. Facebook, Google, and OpenAI have all built tools for this purpose.
It has taken two decades for developers to create artificially intelligent machines. Now that they’ve succeeded, text-to-image AIs are being trained on massive datasets of images and captions from across the internet.
They’ve been trained so well that AI can not only recognize a cat, but also reproduce a totally original image of a cat, and it doesn’t stop there.
The art style, composition, focus, zoom, mood, lighting, colors, and much more are configurable depending on the wording of a text prompt.
Current market leaders in text-to-image software:
There are plenty of other projects on the market but these are the ones we are most familiar with. Most have strict rules on gore and adult content, but that will likely change in the near future.
Each AI model is trained on different data sets, therefore results can vary greatly. Midjourney creates stunning artwork, whereas stable diffusion excels in realism, every company has strengths and weaknesses.
Compare prompts by browsing our extensive AI prompt library.
AI Tech is developing fast so it’s important to stay up to date. A good way to stay in the loop is to join community discussions.
Communities can be found on Reddit, discord, and here on PromptLib, where we are fostering a community dedicated to creating a prompting knowledge base.
Whichever model you’ve chosen, the very first step is to initiate a prompt.
Most, if not all, text-to-image machines offer image prompting as a default function. Giving users the ability to attach an image to a text prompt to provide specific inspiration for the AI to draw from.
If you like a specific picture of lilies, attaching that image will instruct the AI to take inspiration from your picture, rather than random results on the internet.
Simply search for an image, copy the image URL and paste it into the prompt field of your AI of choice.
In this example, we asked Midjourney to paint a picture from an image of a cat we provided:
Text prompts are the words we use to prompt an AI to create an image. The wording of your prompt will drastically effect your generations.
Read on to learn the different aspects of prompt wording.
How do you choose the subject of your prompt? That’s up to you, your only limit is the scope of your imagination.
Let’s build a simple prompt as an example.
This prompt is okay, except it gives the AI too much freedom. By being more specific, the AI makes fewer decisions and draws from more relevant data.
Whereas adding words like ‘expensive’ and ‘restaurant table’ gives a much more accurate result.
There is more to a scene than the subject. In fact, many factors influence how an image can turn out. A subject with a different style, mood, composition, lighting, setting, etc. can turn out very different.
Check out our examples of the same prompt with a one-word difference.
Style words that can influence your generations include beautiful, luminous, mystical, cyberpunk, psychedelic, dreamlike, funk art, abstract, pop art, voyeuristic, avant-garde, natural, and many, many, more.
Art influences art. There are thousands of well-established artists and photographers with a catalog of images on the internet.
With all that content available, it’s easy to train AI to create images in the style of any artist.
For example, we’ve taken the same picture of a city skyline oil painting and told the AI to create an image ‘in the style of’ three unique artists. The result is three unique paintings.
Take the concept further by imagining an original subject. What would it look like if Vincent Van Gogh had painted a trailer park? Or, how would Leonardo Divinci imagine an anime girl?
Famous artists that can improve your prompts include Leonardo da Vinci, Michelangelo, Vermeer, Claude Monet, Eugene Delacroix, Georges Seurat, Edvard Munch, and many, many more.
Millions of images captioned by photographers are used to train deep learning models, along with their attached metadata. Using photography terms will greatly improve your prompt generations because text-to-image models can recognize and reproduce these terms so well.
Lighting, angles, composition, zoom, and blur can all be defined by your prompts.
In this example, we produced a landscape, interior, and macro shot of a house:
Photography terms that could improve your prompts include portrait, headshot, ultrawide shot, golden hour, blue hour extreme closeup, high exposure, macro shot, an expansive view of, wide angle lens, overexposed, saturated, and many, many, more.
AI models are machines trained on human data. Therefore, analyzing how humans use language to describe the world around them can improve your prompts and encourage you to look at creative ways around the limitations of these models.
To see a scary picture of a spider, its neccesary to add mood, style, and photography words to convey horror.
But by simply using the word ‘arachnophobia’ I can very produce similar results:
Parameters
Those brand new to image prompting may be unfamiliar with ‘parameters’ in this context.
Parameters determine aspects of how an image is generated, including:
The parameters are set by developers, therefore they vary across different projects.
Parameters are inserted into prompts using a command. This is a set of special characters inserted into a prompt, that indicates to the AI to set a parameter.
For example, if I was using Midjourney, and wanted to set a parameter for the quality of my image, I would input the command ‘–’ followed by aspect ratio (ar) and a set value.
Parameters always go at the end of your prompt, for example, if I add this parameter to an existing prompt–
It would look like this:
As always, it depends on the algorithm, you can read the full parameter documentation of market leaders like Midjourney on their official websites.
The only thing left to do is click enter on your prompt, generate, and save your image.
Usually a set of 4+ images in low resolution are generated together, with the option available to upscale or create variations.
We're so excited to see you again!
Congratulations! Your upload was successful and is now pending review.