Rules to Better AI-Generated Media - 9 Rules
Mastering AI-generated media is key to enhancing creativity and efficiency. These rules cover everything from generating images to transforming them, ensuring you're equipped with the best practices for AI-driven content creation.
Imagine a scenario where your project requires unique artwork, but you're working with a tight budget or limited time. You don't have much bandwith to brainstorm artwork or search for what you need. In situations like this, experimenting with AI image generation can be a quick and productive solution.
Some of the benefits are:
- Lowered Artwork Costs
- Fast Experimentation
- Accessibility
There are many cases when AI-generated images can come in handy:
- Web Design - You can use AI to create unique background images, icons, and UI elements
- Marketing Campaigns - AI can be a useful tool to help with social media graphics, newsletter images, and event promotions
- Content Creation - You can use AI to add interesting visuals to blog posts, social media updates, and more.
Imagine you’re browsing through an art exhibition online and you come across some strikingly unique images. Upon reading the descriptions, you realize they were all generated using Artificial Intelligence (AI). This piques your interest, and you find yourself wondering, "Could I create something like this?" The answer is yes. Here is how you can do it yourself.
Video: How To Generate INSANE AI Art For Beginners (2 min)Note: Midjourney is no longer free as it was in this video demo.
How AI Image Generation Works
AI image generators are tools that utilize trained AI models to create new images. The models are trained on databases of existing artwork. The most popular AI image generators are Midjourney, DALLE-2, and StableDiffusion.
These image generators work by reading your text and using it to create an image. The text you input is called a ‘prompt’, and it guides the model towards the type of image that you describe.
Each AI image generator works slightly differently, but the basic idea is the same: text ➡️ image.
Generating Your First AI Image
The exact process will vary depending on the generator you're using, but generally, you can follow the following steps:
- Navigate to the generator’s interface.
- Write a short description of the image you want (optional: include a negative prompt (specifying what you DON’T want in the image)
- Generate the image: The tool will create an image based on your specifications.
Practice makes perfect
The more you experiment, the better you'll understand how different inputs affect your results. Try new things and make mistakes – it's all part of the learning process!
There is general consensus that Midjourney is the best tool. Behind Midjourney are DALLE-2 and StableDiffusion. Beware, if you are using any tool besides Midjourney, your images are likely to be noticeably less natural.
Midjourney
Midjourney is used on Discord, where users interact with the bot by typing /imagine.
Note: A Discord account is required first.
- Cost: $8USD/month
- Images can be reiterated on
- Many parameters: Midjourney Parameter List e.g. “--aspect”
-
Prompting in Midjourney:
- Even short prompts can produce beautiful images
- Basic - /imagine cat
- Specify an artistic medium – /imagine {{ ANY ART STYLE }} style cat
- Get specific – /imagine {{ STYLE }} sketch of a cat
- Time travel – /imagine {{ DECADE }} cat illustration
- Emote – /imagine {{ EMOTION }} cat
- Be colorful – /imagine {{ COLOR WORD }} colored cat
- Explore environments – /imagine {{ LOCATION }} cat
DALL-E 2
DALL-E is an AI system capable of creating realistic images from a natural language description.
- Uses a credit system where users purchase credits to use the model
- Some OpenAI users get free credits each month
Leonardo AI
Leonardo AI gets compared to Midjourney for its focus on concept art and imagination. You can use it by creating a free account at Leonardo.ai. Some of Leonardo's unique features are:
- Great website UI
- Incredibly customiseable, with many different models and parameters avaliable
- Built-in image editor
- Built-in prompt generator to help you make the best prompt
DreamStudio
DreamStudio is made by StabilityAI and is used, like DALLE2, on a web interface. It is based on the Stable Diffusion model of image generation.
You can use the demo here for free Stable Diffusion Web, or you can use it through the DreamStudio interface (starting with a free trial).
- You can use the web demo without signing up
- Easy customization of parameters on the interface (e.g., style, aspect ratio)
Adobe Photoshop’s AI-powered and prompt-based generative tool can turn a simple picture into anything you imagine.
Video: Generative Fill for Beginners (4 min)Generative Fill is easy to use
- Select an object or area with any selection tool (lasso, marquee, magic wand, etc)
- Enter a prompt into the contextual taskbar that appears after your selection
- Click generate!
- Use the arrows in the taskbar to see some alternate variations, or press generate again until you see a result you like.
Tips and tricks
- Leave the prompt blank and Generative Fill will use the area surrounding your selection to mask it away. Removing unwanted objects is that easy.
- Be intentional with the size and shape of the selections you make. The tool will use this as extra information to interpret your prompts.
- Generative Fill will create a new generative layer with the same name as your prompt. You can come back and alter the generated content at any time by selecting that layer.
Although there are still discussions around AI images and copyright, Generative Fill is powered by Adobe Firefly and designed for commercial use.
Prompts are the instructions that you input. They can be as simple or as complex as you like.
Video: Advanced Midjourney V5.1 Guide (11 min) - PromptingPrompting basics
A general prompt might be "an image of a sunset over the ocean," which tells the AI exactly what you're looking for.
Tip: When sharing an AI image, add the prompt to the image caption so others can see how you made it.
“A brown dog on a skateboard”
Figure: Good example - A basic prompt
A well-structured prompt often has more details, in the format “A {{ TYPE OF PICTURE }} of a {{ MAIN SUBJECT }}, {{ STYLE CUES }}”.
“A photograph of a robot, cartoon style”
Figure: Good example - A basic prompt with style cues.
You can add more even more detail to make a descriptive prompt by following this template:
{{ ADJECTIVE }}, {{ EMOTION }}, {{ SUBJECT }}, {{ STYLE }}, {{ COLOR }}
Figure: Good example - Use this prompt template!
Prompt length
Prompts that are too short do not give the AI enough information to create an image matching your idea. It is a good idea to be detailed with your prompts, but too much detail is equally likely to give the AI too many instructions, which "confuses" it and can reduce the acurracy.
"A landscape"
Figure: Bad example - A vague prompt like this gives an ambiguous image
"A snowy mountain landscape at sunset with warm hues in the style of a photograph"
Figure: Good example - A detailed and concise description, but not too long. This will provide the AI with specific elements to incorporate, resulting in an accurate image.
"A snowy mountain landscape at sunset... Majestic peaks rise high into the sky, their rugged outlines etched against the fading golden light. Adorned with a pristine layer of glistening snow, they stand as silent sentinels, towering over the vast expanse below. The snow-covered slopes cascade down in gentle curves, inviting adventurers and nature lovers alike. In the foreground, a small creek meanders through the snow-covered landscape, flowing steadily beneath a delicate layer of ice. Over the creek, a footbridge stretches, connecting the two banks. Two travelers cross the bridge, their footprints leaving a mark on the pristine snow. The frozen trees, adorned with icicles, stand like witnesses to the passage of time."
Figure: Bad example - This prompt is too long. It will probably just look like the one above!
Parameters allow you to control different aspects of the generated image via settings on the image generator. Most AI image generators have parameter options, and they can significantly affect the result.
- Resolution: This defines the quality of the generated image. Higher resolution values will result in higher-quality images.
- Randomness: This parameter influences the amount of random variation in the generated image. Higher randomness values may result in more unique or creative images, but they can also lead to images that deviate more from the initial prompt.
- Aspect Ratio: Aspect ratio dictates the proportions of the image. For instance, you might choose a square (1:1) aspect ratio for social media posts, a landscape (16:9) ratio for video thumbnails, or a portrait (3:4) ratio for smartphone screens.
- Style: Style refers to specifying a particular visual style for the image. This could be a certain artistic style (like "impressionistic" or "cubist"). The AI uses this information to guide the stylistic aspects of image generation.
- Uploading: Most AI image generators allow you to upload an existing image so that the AI will create different variations of it.
Traditionally, UI wireframes have been made with tools like Figma, Excalidraw, Balsamiq, or pen and paper. Generative AI tools now streamline the process. We can use Prompt Engineering to create a Proof of Concept (PoC) or translate a design to code with the click of a button!
Video: v0 by Vercel: Create UI Components from Text & Images! (6 min)Here is a longer example of someone using v0.dev to generate a calculator UI and then trying to replicate the same UI by hand: V0 coded a calculator 30x faster than me (17 min)
Boilerplate
When a web developer is handed design images, it can be a drag to spend the next few hours (or days/weeks) building the baseline components, HTML, and CSS before getting to the fun stuff.
Thankfully, AI-assisted tools are beginning to help with the more mundane aspects of this process, and sites such as v0.dev can produce React components (with the code) you can drop into your project to give you a huge head start on the work!
Upload your designers' images and tweak the output with a few prompts to get ready-made components for your app. Just be careful - these tools will often take "creative liberties" with the designs, so keep an eye out.
Proof of concepts
Generative UI tools can be a great way to collaborate with stakeholders in realtime, as you can generate ideas and iterate over them using natural language prompts. This can give developers or designers a useful starting point and frame of reference to build a highly polished design.
If you're a dev that likes (or is forced) to moonlight as a designer these tools can be a great timesaver in creating professional looking web components in a short amount of time. These tools aren't a substitute for a layout created by a qualified designer but they can be great for generating boilerplate code or proof of concept designs that you can build on in the future.
Example
Here is what you can achieve using v0.dev and a few prompts:
🤖 AI prompts excamples:
- Create a form to input customer data like: first name, last name, DoB, email, phone, etc..
- Do it using material style component. With a primary color red
- Use this red instead : #CC4141, and add icons next to labels, like a phone icon next to the phone number, etc
Tools
- v0.dev
-
builder.io
- UIMagic (waitlist)
- Pineapple Builder
Sometimes you might be trying to create a specific type of image, and the AI keeps including pieces that you don't want. A straightforward way to get around this problem is by including what you DON'T want in your prompt.
What is negative prompting?
Negative prompting is specifying what you don't want in your image. It guides the AI away from certain features that you're not interested in. Some AI image generators (e.g. Midjourney and Dreamstudio) have this option as a parameter. In others (e.g. DALLE-2), you can include it in your prompt.
Imagine you are using Midjourney to generate a photo of an emplty highway in the mountains.
“A highway in the mountains”
Figure: Bad example - When you use this prompt, Midjourney keeps putting cars on the highway!
This is when it can be helpful to include a negative prompt. In Midjourney, this is done by using two dashes. (see Midjourney parameter list)
“A highway in the mountains --no cars”
Figure: Good example - The prompt with '--no cars' is more likely to eliminate cars in the picture.
AI tools like Rask, Voice.ai, and ElevenLabs are revolutionizing how we generate voices and translations. They can even create transcripts, making our lives a lot easier. But remember, with great power comes great responsibility!
Video: Fix Your Website Chatbot! - English version (1min)
Video: Fix Your Website Chatbot! - French translation (1min)
The Need for Oversight 👀
While these tools are incredibly helpful, they're not perfect. It's important to double-check their output to ensure accuracy. After all, we wouldn't want any miscommunication, would we?
The Ever-Changing AI Landscape 🌅
The AI landscape is constantly changing and improving. Today's best tool might be tomorrow's old news. So, keep an open mind and be ready to adapt to the latest and greatest!