• How to Swap Faces in Photoshop Using AI Generative Fill

  • by Aaron Nace
    September 29, 2023
  • Add to
    favorites

Download Assets

This tutorial includes 2 sample images and 1 sample PSD.

Download

description

Face swapping in group photos can be challenging, especially when people have closed eyes or odd expressions. But with AI Generative Fill, it’s now easier than ever to get perfect results!

In this tutorial, we’ll show you how to use AI Generative Fill to swap faces in Photoshop, even in tricky areas like hair and overlaps. We’ll also cover common challenges encountered when editing group photos and how to fix them in a few easy steps.

Artist Credit

AFTER

BEFORE

How to Swap Faces in Photoshop Using AI Generative Fill

Every photographer has this shot. The group is finally standing still, the light is good, everyone is smiling — and one person blinked. The frame you love is unusable, and the frame where everyone’s eyes are open is the one where the smiles fell apart. Face swapping solves it. You borrow the good face from another frame of the same shoot, drop it onto the good frame, and blend the two together until nobody can tell there were ever two photographs.

This tutorial walks through that process from start to finish in Photoshop, using the Marquee Tool and the Move Tool to get the replacement face into position, Free Transform to match its size and angle, a layer mask to blend the edges, and Generative Fill to clean up the places where the two frames disagree — overlapping hair, doubled ears, and the seam along a collar.

A group family portrait open in Photoshop with one subject's face selected for replacement

Start With Frames From the Same Shoot

The single most important decision happens before Photoshop opens: which frame you pull the replacement face from. Use another exposure from the same session, ideally one taken seconds apart. The light will match, the white balance will match, the direction the shadows fall will match, and the subject’s clothing and hair will be in almost the same place.

A face pulled from a different day — or a different location, or a different lens — almost never blends. The color of the skin will be slightly off, the catchlights in the eyes will point the wrong way, and the softness of the light will not agree with the rest of the frame. You can fight all of that with adjustment layers, but it is hours of work to fix something that costs nothing if you simply shoot a few extra frames.

This is why photographers shoot groups in bursts. You are not looking for one perfect frame. You are collecting parts.

Open Both Frames Together

Bring both images into Photoshop as separate documents, or as two layers in the same document. Working with two tabs open side by side makes it easy to flip between them and confirm you are pulling the right face — in a group of five, it is surprisingly easy to grab the wrong person.

Move the Replacement Face Into Place

With both frames open, the actual transplant is quick.

  1. Select the replacement face with the Marquee Tool

    Draw a generous rectangle around the face you want to borrow. Do not try to be precise here — there is no need to trace the jawline or cut around the hair. A loose rectangle that includes some background and some shoulder is exactly right. All of the precision happens later with a mask.

  2. Drag it across with the Move Tool

    Switch to the Move Tool and drag the selection from one document onto the other. Photoshop drops it in as a new layer. If you are working inside a single document, copy and paste onto a new layer instead.

  3. Lower the layer opacity to about 50 percent

    This is the trick that makes the whole technique work. At half opacity you can see both faces at once, which turns positioning from guesswork into simple alignment. Bring the opacity back to 100 percent only once everything lines up.

Match the Scale and Angle

The two frames were shot from marginally different positions, so the borrowed face will almost never be the right size straight away. Press Ctrl+T (Windows) or Cmd+T (Mac) to bring up Free Transform.

Move the Transform Reference Point

By default Photoshop scales from the center of the selection. That is rarely what you want here. Drag the reference point down to something that should not move — the collar, the shoulder seam, the base of the neck. Now when you scale, the parts of the image that already line up stay put, and only the face moves.

Use the Eyes as Your Guide

With both layers visible at reduced opacity, scale until the eyes in the top layer sit directly over the eyes in the bottom layer. Eyes are the reference that matters. If the eyes match, the mouth and nose will be close enough that a mask will handle the rest. If the eyes are off by even a few pixels, the swap reads as wrong no matter how clean the blending is.

Rotate slightly if the head tilt differs between frames. Small rotations are normal — people move constantly during a group shot.

Free Transform used in Photoshop to scale and align a replacement face over the original

Blend With a Layer Mask

Bring the layer back to full opacity and add a layer mask. Take a soft round brush, set the foreground color to black, and paint away the edges of the rectangle you pasted in.

Work from the outside in. Start well away from the face and paint back toward it, revealing the underlying image everywhere the two frames disagree. Keep the brush soft and the opacity moderate so the transition is gradual rather than a hard line. Reduce the brush size as you get closer to the features.

Where to Stop

The goal is to keep only what you actually needed — usually the eyes, and sometimes the mouth. Everything else can come from the original frame. The less of the borrowed face you keep, the less there is to go wrong.

Toggle the layer visibility on and off as you work. Flipping between the two states is the fastest way to spot a transition that is not holding up.

Fix the Hard Parts With Generative Fill

Hair and ears are where face swaps fall apart. If the subject’s head moved between frames, the hair in the top layer will collide with the hair in the bottom layer, and you can end up with a doubled ear or a strand of hair that starts in one place and ends in another. Masking cannot solve this, because both versions are wrong.

Select the Problem Area and Leave the Prompt Empty

Make a selection around the trouble spot, click Generative Fill, and — this is the part people miss — leave the prompt box completely empty before pressing Generate. With no prompt, Photoshop is not trying to invent something new. It looks at everything surrounding the selection and fills the area with what belongs there. For a patch of hair or the edge of an ear, that is exactly the behavior you want.

Generate produces three variations. Cycle through them in the Properties panel and pick the one that reads best. If none of them work, press Generate again for three more — the results vary each time, and a second round often solves what the first could not.

If Generative Fill Refuses to Run

Photoshop will sometimes decline to generate on a selection that is mostly bare skin. If that happens, widen the selection to take in more of the surrounding area — hair, clothing, background — and try again. Giving the model more context to work from usually clears it.

Generative Fill used with an empty prompt in Photoshop to repair overlapping hair after a face swap

Group and Clean Up

Once the swap is working, select the layers that make it up and group them together. Add a mask to the group itself. This gives you a second, non-destructive pass over the whole composite: you can soften an edge or bring back a piece of the original without disturbing any of the work underneath.

Then zoom to 100 percent and look at the seams. The places to check are the hairline, the edge of the jaw, the collar, and the skin tone across the transition. Anything that catches your eye at full zoom will catch a viewer’s eye too.

Keep the Swap Honest

This technique exists to rescue photographs, not to fabricate them. Borrowing a face from another frame of the same sitting — so the family portrait shows everyone with their eyes open — is retouching in the same tradition as removing a stray hair or a blemish. Everyone in the frame was there, in that light, in that moment. You are just choosing which fraction of a second each of them gets to be represented by.

Quick Reference

  1. Pick a frame from the same shoot

    Matching light and white balance do most of the blending for you.

  2. Marquee the face and move it across

    A loose rectangle is fine. Precision comes from the mask.

  3. Drop opacity to 50 percent to position

    Seeing both faces at once turns alignment into a simple line-up.

  4. Transform from the collar, match the eyes

    Move the reference point off center and scale until the eyes align.

  5. Mask with a soft black brush

    Keep only what you needed — usually just the eyes.

  6. Generative Fill with an empty prompt

    Repairs hair collisions and doubled ears using the surrounding pixels.

  7. Group and add a group mask

    Gives you a final non-destructive pass over the whole composite.

200+
PRO COURSES & MASTERCLASSES
1,000+
DOWNLOADABLE PSDs & RAW FILES
4K
ULTRA HD VIDEO QUALITY
93%
FIVE STAR RATINGS
2M+
SUBSCRIBERS & STUDENTS

Enjoying This Free Tutorial? Go Further with PRO.

Unlock Full Sample Files, PSDs, and Hundreds of Masterclasses!

Download full project assets, original PSDs, and RAW images for every lesson

Unlimited access to our complete library of PRO Photoshop & Lightroom courses

Instant 4K Ultra HD streaming on all devices, anytime, anywhere

Full access to our entire library of Photoshop Actions, Presets, and LUTs

Flexible monthly and annual membership plans

Cancel anytime with zero hassle or commitments