5-Dec

Machine Learning

Creating exciting stock photos with ChatGPT and MidJourney

Looking for some neat looking imagery for your next blog post, but feel like Unsplash is played out? Then this article is for you!

3 min read

·

By Kristofer Selbekk

·

December 5, 2022

There are so many cool new toys out there, based on artificial intelligence tools like OpenAI. Where you previously had to train your own models and understand pretty advanced concepts, you can now write simple prompts in well-designed UIs, and get astonishing results out on the other side.

In today's quick tip, I'm going to show you how I use some of these tools create a bit of visual flair for my articles and web sites.

Step 1: Use ChatGPT to create a text prompt

ChatGPT is a new language model from OpenAI, that lets you talk to a chat bot of sorts. Well, a chat bot that actually give you valuable answers that are factually correct!

Lots of people have had a bunch of fun having it write raps about their loved ones or favorite technologies, but today we're going to use it to help us write great prompts for another AI tool - the image generating tool MidJourney.

Let's use the image in this article as an example. Here's what I wrote:

"Create a prompt for an image where a woman is sitting in front of a computer, looking at a website with lots of boring images. she looks really bored and is not finding what she wants."

This is what I got in return:

"The woman sits in front of her computer, scrolling through a website filled with dull, uninteresting images. She looks bored and frustrated, unable to find what she is looking for. Her face is illuminated by the blue light of the screen, and she seems to be searching for something to break the monotony of the dull images. Despite her efforts, she is unable to find anything that catches her interest, and she leans back in her chair with a sigh. She looks around the room, as if seeking something else to do, but her eyes eventually return to the screen, and she continues to scroll through the website, looking for something, anything, that will capture her attention."

Now, that's pretty neat – and it got generated in about a second! Let's try to use it for some image generation!

Step 2: Use MidJourney to generate an image based on that prompt

Now that we have a pretty nice prompt, let's try to jam it into another AI tool - this time we'll use MidJourney, but you can use any image generation tool you like. We pass in the prompt, and add what kind of style we want at the end. For this prompt, I added "Realistic render, bright colors". I'm not really great at writing prompts, you see, but turns out it doesn't matter too much.

After a couple of iterations, variations and upscales, this is what I ended up with:

A woman sitting in front of her computer, looking a bit bored.
What you get with an AI based prompt given to an AI based image generation tool

I think that's pretty neat for a couple of words of input! Now, you could feed this back into more tools, but for me, it gives me just the right vibe.

Step 3: Profit

And by the end of writing this blog post, I've gotten what I came here for - an AI generated hero image for my blog posts about AI generated hero images. Pretty cool!

Using artificial intelligence in new ways is a really new arena, where lots of cool use cases will pop up. The power of the Chat GPT model is definitely amazing, and combining it with tools for image creation is just one of hopefully many ways we can take advantage of it.