Duck
Tutorials8 min read

A Practical Guide to Building Your Own Free Headshot AI

Samet Turan— Editor··8 min read

Stop paying for AI headshots. This guide shows you how to build a free headshot AI generator using open-source tools and a simple automation workflow.

The Core Stack: What You Actually Need

Forget the all-in-one web apps for a minute. If you want control and want to do this for nearly free, you need three components. First, a way to run a graphics card (GPU) in the cloud. Second, software to train a custom model of your face. Third, software to generate images using that model. That’s it. Everything else is just a user interface on top of this stack.

For the GPU, I use RunPod or Vast.ai. These are marketplaces for renting GPU time from data centers and individuals. You can get an NVIDIA RTX 3090, which is more than enough for this, for about $0.20-$0.40 an hour. Honestly, $0.25/hr for a 24GB VRAM card is a steal. You’ll only need it for an hour or two to get this entire process done, so your total cost might be less than a dollar. Compare that to the $29 one-time fee most dedicated headshot sites charge.

For the software, we’ll use open-source tools. The best method for training a ‘face model’ is called a LoRA (Low-Rank Adaptation). It’s a small file that teaches a big, general AI model what your face looks like. We’ll use a tool called Kohya_ss to train the LoRA. To generate the final images, we’ll use any popular Stable Diffusion interface like AUTOMATIC1111 or its variants. These tools are free; you’re just paying for the computer you run them on.

What Most Guides Get Wrong About Training

Most tutorials I’ve seen on this topic are either trying to sell you something or they give you bad advice. They’ll tell you to just write a very descriptive prompt of yourself into a generic text-to-image model. This never works well. You’ll get a generic-looking person who *kind of* resembles you, but it’s clearly not you. The eyes will be wrong. The facial structure will be off. It’s useless for a professional headshot.

🤖
Recommended Reading

AI Side Hustles

12 Ways to Earn with AI

Practical setups for building real income streams with AI tools. No coding needed. 12 tested models with real numbers.


Get the Guide → $14

★★★★★ (89)

The correct method is to train a model on your own photos.

But even here, many guides suggest ‘fine-tuning’ a whole Stable Diffusion model. This is overkill. It’s slow, expensive, and creates massive gigabyte-sized model files. The superior method is training a LoRA. A LoRA is a tiny file, maybe 100MB, that acts like a plugin. It modifies a big, general model (like one trained on millions of realistic photos) to inject your specific face. It’s faster to train and far more flexible, as you can mix and match your face LoRA with different styles and base models.

My biggest gripe with this whole process is the state of the documentation for LoRA training. It’s a disaster. You’re often piecing together advice from week-old Reddit threads, obscure GitHub readmes, and contradictory YouTube videos. It took me a full weekend of trial and error to find a stable workflow. The settings are cryptic, and nobody explains what they actually do in plain English. That’s what I’m laying out here, so you don’t have to repeat my frustration.

Step-by-Step: Training Your Personal Headshot LoRA

This is the technical part, but it’s not coding. It’s just following steps. If you can install software, you can do this.

  1. Gather 15-20 Source Photos. This is the most important step. You need a variety of high-quality photos of your face. Different angles, different lighting, different expressions. Don’t use photos with sunglasses, hats, or other people. Clear, well-lit selfies and photos taken by others are perfect. Crop them all to 512×512 or 768×768 pixels.
  2. Rent a GPU Instance. Go to RunPod. Find a cheap RTX 3090 or 4090 instance. When you deploy it, choose the ‘RunPod Stable Diffusion’ template. This gives you a machine with all the necessary software pre-installed. It saves a ton of setup time.
  3. Upload and Prepare Images. Once your ‘Pod’ is running, connect to the Jupyter Lab interface. Use the file browser to create a new folder and upload your prepared photos. You then need to ‘caption’ them. All of them need a caption that includes a unique trigger word. For example, create a text file for each image with the caption: a photo of ohwx person. The ‘ohwx’ part is your unique identifier. You can make it anything, just make it unique so the model doesn’t confuse it with a real word.
  4. Configure the LoRA Training. The RunPod template includes the Kohya_ss training GUI. Open it. You’ll see a lot of tabs. Point the ‘Image folder’ setting to your new folder of photos. Set the ‘Model’ to the base Stable Diffusion 1.5 model provided. In the training parameters, start with these settings: 20 epochs, a learning rate of 1e-4, and a network rank (dim) of 128. Don’t worry about what these mean yet; they are a solid starting point.
  5. Run the Training. Hit the big ‘Start Training’ button. You’ll see the console start spitting out progress updates. On an RTX 3090, for 20 photos over 20 epochs, this should take about 20-30 minutes. Go make a coffee.
  6. Download Your LoRA. When it’s done, you’ll have a new file in your output folder named something like ohwx_person.safetensors. That’s it. That’s your face. Download that file and terminate your RunPod instance so you stop getting charged.

How Do You Actually Generate the Headshots?

Now for the fun part. You take your LoRA file and use it with a standard image generation tool. You can do this on that same RunPod instance before you shut it down, or you can install a tool like Fooocus on your own computer if you have a decent gaming PC.

The process is simple: you load a general-purpose photorealistic model (like Realistic Vision v6.0 or Juggernaut XL), and then you tell it to also apply your LoRA file.

Then you write a prompt that includes your special trigger phrase. For example:

professional headshot photo of ohwx person, corporate CEO, modern office background, soft natural lighting, sharp focus, wearing a dark blue blazer

The magic here is that the base model knows how to create a ‘professional headshot’ of a ‘corporate CEO’. Your LoRA file hijacks that process and says, “whatever you do, make sure the person looks exactly like this.” The first time you get a perfect, photorealistic image of yourself in a context you’ve never actually been in… it’s a wild feeling. The level of control is something no off-the-shelf app gives you. This is my favorite part of the whole workflow; it feels like a superpower.

Automation: Turning This Into an Operator Playbook

Doing this once for yourself is a fun project. But what if you want to offer it to your team of 10? Or build a small side business selling headshots? You need an ai automation blueprint. Manually walking each person through the steps above is a non-starter.

The path to automation involves putting an API in front of the generation script. The AUTOMATIC1111 web UI has a built-in API that you can enable. You can then send it a prompt and get an image back. You could build a simple front-end with a form where a user uploads their photos and enters a desired scene. This front-end would then call your backend, which would programmatically run the LoRA training and image generation steps.

The main challenge is managing the GPUs (which, yes, is a huge pain). You can’t have a $0.40/hr GPU running 24/7 waiting for a request. This is where serverless GPU providers like Banana.dev or Beam come in. They have systems that can start a GPU instance when a request comes in, run the job, and then shut it down. This is the core of a real operator playbook for this kind of service. It’s also the most complex part to build and get right.

How to Debug When Your Face Looks Warped

Your first few attempts might produce some… interesting results. Here are the most common failure modes and how to fix them.

  • The ‘Overcooked’ Look: Your face looks like a caricature, with exaggerated features. This means your LoRA is being applied too strongly. In your prompt, you can adjust the weight. Instead of just including ohwx person, you’d write <lora:ohwx_person:0.8>. The 0.8 tells the generator to apply it at 80% strength. Play with this number until it looks natural.
  • Melted or Messy Details: If the image is a mess of colors or looks distorted, the problem is likely your CFG Scale. This setting controls how closely the generator follows your prompt. If it’s too high (e.g., above 12), it can fry the image. Try lowering it to 7 or 8. It can also happen if your LoRA was trained on a different base model than the one you’re using for generation (e.g., trained on 1.5, generating with an XL model).
  • Bad Likeness: If the output doesn’t look like you, the problem is almost always your input photos. You need more variety in angles, lighting, and expressions. If all your training photos are of you smiling straight at the camera, the AI won’t know how to generate you in profile or with a neutral expression. Go back to step one and curate a better dataset. Garbage in, garbage out.

Building this yourself gives you full control and costs next to nothing. It’s a perfect example of a practical AI system a solo operator can build.

Adjacent reading: AI meeting tools coverage.

If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this entire workflow as a ready-to-deploy AI automation blueprint. You can find it at deepusecase.com/vault.

— The Colophon

One AI tool. Tested. Reviewed.
In your inbox every Sunday.

~3 minute read. Real outcomes from operators, not marketers.

Free. One email per Sunday. Unsubscribe in one click.