MIDJOURNEY, TEXT-TO-IMAGE
Taking generated Midjourney (MJ) images to the next level
A text-to-image generation pipeline for human faces for midjourney
In this article
This article will give a quick overview on a process pipeline and to generate more realistic synthetic human faces using midjourney .
Bad facial reconstruction
Anybody who has used midjourney for creating images which involve human faces, knows pretty well that, the images generated using midjourney have a bad finish when it comes to human faces.
For example — the images below are generated using midjourney app ( Upscaled version ) and almost every realistic image of a human face ends up distorted.


A facial restoration pipeline
To reduce the facial reconstruction aberrations and to make it more useful , here is a quick image generation pipeline you can try —

Step 1 : provide a link to an image as your image prompt , along with your text prompt . Learn how to do some advanced text prompt generation by following the link here. ( An advanced guide to writing prompts for Midjourney )
Step 2 : Refine with keywords and attributes
Step 3 : Pass the refined image as input to GFPGAN.
Step 4. You can feed this new restored image back into the image prompt or continue with a couple of iterations in GFPGAN.
👉 Note : This may need s few iterations from the face reconstruction package ( GFPGAN ) and so might be easier to create a tiny python script for the same.
GANS
GANs (Generative Adversarial Networks) are neural networks which generate images ( of objects, human faces, and almost anything ) from random noise by iteratively trying out several rounds of trial outputs which are better than the previous attempt. After a few iterations, they generate synthetic images which are almost similar to the real images which were originally present in the training set.
( Unfortunately, we wont be going into the details of the working of GANs. ) You can learn about GANs here in this wonderful book. (GANs in Action: Deep learning with Generative Adversarial Networks — by Jakub Langr and Vladimir Bok)
GFPGAN ( Generative Facial Prior GAN )
GFPGAN is a GAN implementation which specializes in restoring human faces . As menetioned in their site, they
It is open sourced and is available here . (https://github.com/TencentARC/GFPGAN )
But for those of you who donot have a GPU supported machine or are not technically savvy ( in case you might run into some troubles having to fix some errors), here is the GFPGAN implementation on hugging face spaces . The link here — https://huggingface.co/spaces/akhaliq/GFPGAN
Back to midjourney
Here are some of the samples of real outputs we restored from midjourney.



Potential to create stunning facial Images
And here are some images of human faces generated through midjourney — after a few iterations .

References
- GFPGAN github link — https://github.com/TencentARC/GFPGAN
- GFPGAN original paper — https://arxiv.org/abs/2101.04061
- Original Homepage — https://xinntao.github.io/projects/gfpgan#citation
Related Links
- How to write better prompts and get your desired results from the Images generated by Midjourney
2. How Adobe is implementing AI into its environment.
3. A practitioners guide to using lama-cleaner ( An open source watermark remover)