Handcrafting Image Prompts Is Dead: Reverse Engineer Midjourney-style Images with PromptPerfect
From Punk Einstein to Turbo Pigeons: Use PromptPerfect Interactive to reverse engineer prompts from pictures and generate Midjourney-style images with real-time feedback.
Hey you! Yeah, you, reading this. The prompt engineer who spends far too much time on Midjourney and other image generation models. This post is just for you.
'I never thoughtLeopardsAI would eat MY face,' sobs woman who voted for theLeopardsAI Eating People's Faces Party.
With AI eating more jobs, we might also say:
First AI came for the artists, and I did not speak out – because I was not an artist. Then it came for the prompt engineers (who used AI to bulldoze the artists in the first place), and I got screwed over because that was my job.
That's right, pal. You put the "mid" in Midjourney. Your Stable Diffusion is more like unstable confusion. And your DALL-E skills are actually CRAP-E. With tools like PromptPerfect anyone can simply reverse engineer existing images to generate prompts, or generate prompts with real-time, step-by-step feedback from a human in the loop.
So, let's jump in and see how you can reverse engineer prompts from images, so you can keep ahead of the AI leopards who want to eat your face...at least for now.
PromptPerfect Interactive
PromptPerfect Interactive transforms how you generate content and tackle complex tasks. It's built on a dual approach:
- Dedicated Assistant: An AI companion that understands your needs and helps you craft effective prompts, making the content generation process as seamless as possible.
- Powerful Optimizer: An advanced tool that fine-tunes your prompts for optimal results, ensuring that your creative and productive endeavors are more effective than ever.
PromptPerfect has recently introduced Midjourney-style image generation, so in this post, we'll use Interactive’s assistant and optimizer to reverse engineer prompts from images and then generate new images based on those prompts in the style of Midjourney.
How to Reverse Engineer Image Prompts
First up, we need an image to work from. Let's use this image of punk Einstein I generated in Midjourney previously:
To generate the image I used this prompt in Midjourney:
Realistic photo of Albert Einstein as a punk, retaining his recognizable facial
features, with a brightly colored mohawk, visible tattoos, facial piercings,
and wearing a spiked leather jacket, highly detailed, photorealistic, vibrant
colors, dramatic lighting --ar 4:5 --s 500 --v 6
I then uploaded the image to PromptPerfect's Interactive Assistant and asked it to generate a prompt based on that image:
The prompt it returned was:
Colorful punk hairstyle, vibrant pink, orange, and gray hair, edgy jacket with
spikes and colorful geometric patterns, urban background, bokeh lighting,
cyberpunk aesthetic --ar 4:5 --v 6 --s 500
Nice...except there's one thing missing: Old Albert himself. Since Interactive has a chat-based interface, I just told it to add him to the prompt:
I then got:
Albert Einstein with a colorful punk hairstyle in vibrant pink, orange, and
gray hues, wearing an edgy jacket adorned with spikes and colorful geometric
patterns, set against an urban background with bokeh lighting, cyberpunk
aesthetic --ar 4:5 --v 6 --stylize 500
You'll notice it's not exactly the same prompt that I used to create the initial image. This is perfectly normal - firstly because AI-generated images incorporate features beyond the prompt used to create them. For instance, in the initial image, Einstein is looking to the right, and has a splash of red on his lapel - I didn't specify those in the prompt, so if you reverse engineer a prompt from the image, you won’t just get back the same prompt you started with. The second reason is that the image analysis model (like a lot of AI) is non-deterministic -- you can ask it a second time to reverse engineer a prompt from the same image and it may pick up different details.
Anyway, now that we have a prompt, we can click the "send to Assistant" button to generate four Midjourney-style images:
Again, you can see it doesn't match the initial image, and it never will. Just try putting the same prompt into an image generation model a second time and you'll get completely different results - like the image recognition model it's non-deterministic.
I really like the top-left image. By clicking it I can choose to upscale, and voila, here's my final image of everybody’s favorite crazy-haired physics uncle:
Of course, you can also test the prompt in Midjourney proper, and you'll get similar results:
More Examples
Here are a few more examples. The order of content is:
- Initial prompt
- Image generated on Midjourney proper
- Reverse-engineered prompt
- Midjourney-style image generated on PromptPerfect Interactive
Turbo Pigeon
abstract, minimalist mesh wireframe of A pigeon::4 , wearing a helmet and
carrying a turbo booster on its back, with a gradient of green, cyan, and blue
lines against a black background, Vanishing point, with minimal detailing::4 ,
--ar 16:9 --s 750 --v 6.0
Futuristic bird with neon lights, intricate feather details, glowing pink and
blue colors, highly detailed, digital art, ethereal and luminous, dark
background, dynamic light streaks, cybernetic effect, hyper-realistic --ar
16:9 --v 6 --stylize 750
Melting brain
melting brain, floating in space, plain black background --ar 16:9 --niji 6
--s 750
Surreal, melting brain suspended in space, dripping neon pink and blue colors,
abstract, fluid textures, hyper-detailed, futuristic, digital art, cosmic
background with stars, vibrant and glowing, soft lighting --ar 16:9 --v 6
--stylize 750
Bollywood Princess Leia
Bollywood Star Wars scene, close up shot of Princess Leia Organa in traditional
Indian attire, intricate jewelry, holding a defender sporting blaster pistol,
vibrant colors, futuristic elements, sci-fi, dramatic lighting, detailed
background, cinematic, 8K resolution, Unreal Engine, --ar 4:5 --v 6.0
Princess Leia, holding a blaster, futuristic sci-fi setting, white robe,
detailed hair buns, dramatic lighting, heroic pose, vibrant colors, cinematic
scene, intricate background with glowing elements --ar 4:5 --s 500 --v 6
Hmm...gotta say, I really miss the Bollywood aspect. That's just a fact of reverse engineering - sometimes the image analysis algorithm doesn't see something that a human would. After a bit of jiggery-pokery (a highly technical prompt engineering term), I refined the prompt to this:
Princess Leia, holding a blaster, futuristic sci-fi setting, dressed in a
white robe with intricate Indian embroidery, ethnically Indian with
traditional Indian facial features, detailed hair buns adorned with
traditional Indian jewelry, dramatic lighting, heroic pose, vibrant colors,
Bollywood-inspired design, charismatic expression, cinematic scene, intricate
background with glowing elements and traditional Indian patterns --ar 4:5 --s
500 --v 6
Which gave me this image:
This is where the interactive optimizer really shines. If it were just me, I would've simply thrown the term bollywood
into the prompt. But by asking the optimizer to Refine this Midjourney-style prompt to include more Bollywood vibes
PromptPerfect added more descriptive words to the prompt (traditional Indian patterns
, etc.). Adding more words and details suggestive of a specific outcome is usually a much better way to influence the generated image than fiddling with weights and styles.
Pastel Medal
a medal is sitting on a podium against pastel colored confetti, in the style
of simplified forms and shapes, yellow and beige, columns and totems, playful
streamlined forms, nerdcore, contest winner, repetition and pattern --ar 64:39
--s 750 --v 6.0
Award medal, intricate laurel design, suspended from a ribbon, celebratory
background, vibrant confetti, glowing lights, high detail, 3D render, soft
lighting, pink and blue color scheme, festive atmosphere --ar 16:9 --s 500
--v 6 --stylize 750
Start Reverse Engineering Images
To get started using PromptPerfect to reverse engineer image prompts, sign up and try a paid PromptPerfect plan free for seven days. And subscribe to a plan within 24 hours of your first login to get 40% off:
You know it’s the only way to keep ahead of those hungry AI leopards!