Creating AI Headshots (without paying anything)

September 24, 2024

Recently I decided that my headshot was outdated, and that I needed to create a new one. I basically had to pay for a headshot, get a suit, go somewhere to get a picture, all that greatness. I am someone who uses a lot of generative models for my work and school, and I wanted to see to what extent I can generate professional pictures of myself without paying for anything, and without putting in more work than actually getting a headshot.

 

I ended up paying for two different services, as I got really in to this problem, but this will focus on what I was able to do for free. 
 

Note: I have an RTX 3070, so this gives me the ability to run a lot of these models that have high resource demand. However, most of the programs I am running can be run in small batches on cloud computing services for free.

Some examples I found online, using stable diffusion:

 


Baseline/Training Images

Here are some images of myself that I used in this process. I used several images in various lighting conditions, and I used the same images for each model I trained.

Baseline images used for AI model training


Stable Diffusion

Model Selection

Juggernaut

I played around with a lot of models seeing what worked well for this task, while also not taking a ridiculous amount of time. I ended up using an SDXL model, even though FLUX models are the latest and greatest thing right now. It takes me about 30 seconds to generate a batch of 4 images with SDXL, and close to 5 minutes using FLUX. I used a lot of SDXL models in this process, and I settled on Juggernaut.

because it seemed pretty optimized for working with faces. I also used a Lora from FaceID, but I don't think this was necessary, as I ended up not really modifying my face from existing images. (This will make sense after I explain the process used).

Juggernaut is great, and was already creating realistic images, before any amount of fine-tuning for my face.

 

Sample outputs from the Juggernaut SDXL model

 

RooP extension

This is the first thing I really tried, as this is an extension that exists only to transplant faces into generated images. (Link to RooP) I created a couple of models within the RooP interface, and they all performed about the same. I got some decent results, but most here were not very good.

AI-generated image using RooP extension for face transplant
Face transplant result using the RooP extension

SDXL VAE

I found this process in a YouTube video, and it is a pretty interesting pipeline. Definitely worth checking out, I can see this being helpful for a large scale face swap with different source faces for each target face. With relatively little source information, it can move a face, and adapt to context pretty well. I would not recommend this for what I am doing, as there is a lot of work/overhead on this process, and I got very similar results to the other zero-shot processes.

AI-generated image using SDXL VAE method
Result from the SDXL VAE face swap process

Img2Img Inpainting

This is what I played around with the most, and ended up using in combination with other processes to create my final dataset. Here, I just took pictures of myself and painted over my face, and generated the rest of the image, using a denoising strength of ~0.6.

This allowed me to maintain a lot of the image context while still altering the clothing and background. I later used Photoshop to correct any color or lighting issues between my face and the generated image, which I will outline in the next section. This is the most time-consuming method out of these, but by far produced the best results. 

A lot of this was just changing the denoising strength, the prompts, and the inpaint mask to see what I am able to create. Some of the generated images are below

 

Results from Img2Img inpainting


Paid Services

"Try It On"

I paid $19 for 300 credits at TryItOn, which is the same as generating about 80 images. They advertise a fully contained experience, saying they can assure that generations will be hallucination-free. I was moderately satisfied with the results, but I didn't end up using any of the pictrues that I generated. I found much better results with an image prompt, rather than just a text input. It works a lot like stable diffusion prompting (with positive and negative prompts), so it is easy to use if you are familiar with that. In the end, probably would not recommend this service, as a lot of the images were not that similar to me without some retouching. I actually used one of these images as this site's homepage image.

Here are some results from "Try It On". The first two are good ones, and the second selection are bad ones.

Acceptable results from TryItOn

Poor results from TryItOn

 

Artisse

Artisse (artisse.ai) is pretty decent for the price. I paid $3 to generate about 20 images. It does not work well with text prompts, but it is pretty decent with image prompts. One thing I did that worked pretty well was using images generated from Stable Diffusion or TryItOn as prompts. They are already pretty similar to my face structure and I got some decent results. I had some technical difficulties with this app, as it took over a day to generate a single image on two occasions. Other times it took about 60 seconds, and you are only allowed to generate one image at a time.

This app took about 10 minutes to set up, and was pretty cheap. It was a lot faster and resource effecient than other solutions.

Here are some images generated from this app:

outputs from Artisse AI

 


Photo Polishing & Photoshop

Photoshop does cost money, but I just use Photopea, which has a lot of the same functionality. It was free and allowed you to make small changes to facial structure. I took a lot of the best images from the last couple of methods and made changes to see if I could get them working. I also took AI-generated versions of myself, and added real photos of my face onto them in Photoshop. Results are mixed. Some of these still do not look like me, but this was just general polishing of some of the images generated here.

portraits refined with photo editing, mixed results