Assigning Roles and Creating Images
One common technique in prompt engineering is utilizing roles to generate images.
For example, if you want an image that looks like it was drawn by a child, you can craft a prompt like the one below:
Imagine you are a 7-year-old child. Draw a zebra running in a meadow with the artistic skill of a 7-year-old.
This approach goes beyond simply depicting a zebra running in a meadow; it allows the creation of an image that authentically resembles something a young child would draw, based on the 7-year-old child's
perspective.
- Commonly Used Role Prompts
- Child
- Professional photographer
- Illustrator
- Artist
- Visual designer
So far, we have explored prompt engineering techniques that are cost-effective for image generation.
There isn't a perfect formula that fits all situations, like in a math problem, when it comes to crafting prompts. However, there are widely accepted strategies to achieve desired outcomes with minimal trial and error.
Recap of Image Generation Prompts
[Modifier] + [Subject] + [Detailed Description] + [Style] + [Aspect Ratio]
A futuristic city with a cyberpunk feel full of neon signs,
the cityscape clearly visible against the dark night sky,
captured in a way that resembles a professional photograph,
with an image aspect ratio of 7:4
Modifier & Subject | A futuristic city with a cyberpunk feel full of neon signs |
---|---|
Detailed Description | the cityscape clearly visible against the dark night sky |
Style | captured in a way that resembles a professional photograph |
Aspect Ratio | with an image aspect ratio of 7:4 |
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.