Face restoration

On this page 7

Face restoration is the use of generative AI models to recover a clear, detailed face from a degraded image, such as a blurry snapshot, a heavily compressed video frame or a scanned old photograph. In generative media, it is a specialized form of blind image restoration that relies on strong facial priors learned from large face datasets.

Unlike general upscaling, face restoration knows what eyes, teeth, skin and hair typically look like, so it can synthesize missing detail instead of merely sharpening existing pixels. That power is also its main risk: the output is a plausible reconstruction, not a guaranteed record of the real person.

How face restoration models rebuild detail

A typical pipeline starts with face detection and alignment, which locates each face, estimates facial landmarks and warps the crop to a canonical position, usually 512 × 512 pixels. The restoration network then processes the aligned crop, and a paste-back step blends the result into the original frame with a soft mask.

The network itself is trained on pairs of clean faces and synthetically degraded copies, created with random blur, downsampling, noise and JPEG compression. Because real damage is unknown, this blind degradation model must cover a wide range of conditions, otherwise the model fails on photos that do not match its training distribution.

The table below lists the stages of a standard face restoration pipeline and what each one controls.

StageFunctionTypical failure if poor
DetectionFinds faces and bounding boxesMissed small or profile faces
AlignmentWarps face to a canonical poseDistorted features, wrong eye position
Restoration networkSynthesizes clean facial detailPlastic skin, identity drift
Face parsing maskSeparates face from hair and backgroundVisible seams at the hairline
Background upscalingEnhances the rest of the imageSharp face on a blurry scene
Stages of a face restoration pipeline

Main model families and their priors

Modern face restoration models differ mainly in where their prior comes from. Some borrow it from a pretrained generative adversarial network, some from a learned discrete codebook, and newer ones from diffusion models, which offer the richest detail at the highest compute cost.

ApproachPrior typeStrengthWeakness
GFPGANPretrained StyleGAN generatorFast, natural skin textureWeak on severe damage
CodeFormerLearned codebook with transformerRobust, adjustable fidelity weightCan smooth fine identity cues
RestoreFormerHigh-quality key-value dictionarySharp eyes and mouth detailSensitive to misalignment
Diffusion-based restorersPretrained diffusion modelHighest realismSlow, more hallucination risk
Reference-based methodsOther photos of the same personBetter identity preservationNeeds extra source images
Representative face restoration approaches

CodeFormer exposes a fidelity weight between 0 and 1: values near 0 favor visual quality, values near 1 favor faithfulness to the input. A middle value around 0.5 to 0.7 is a common compromise for old photographs.

Face restoration is often confused with neighboring tools in generative media, but its goal is narrower: to improve the same face without changing who it belongs to. The following comparison clarifies the boundaries.

TechniqueGoalChanges identityTypical input
Face restorationRecover clean detail of one faceShould notDegraded photo or frame
General upscalingIncrease resolution of the whole imageNoLow-resolution image
Face swapReplace one face with anotherYes, by designSource and target faces
Face reenactmentTransfer expressions or motionNo, but alters expressionVideo and driver footage
Beauty filtersSmooth and reshape featuresPartiallySelfie or live camera feed
Face restoration and neighboring generative tools

In practice, tools such as Real-ESRGAN often handle the background and body, while a face restoration model is applied only to detected faces, because general upscalers tend to produce waxy or warped facial features on their own.

Practical use and configuration

Face restoration appears in photo archive digitization, video remastering, image generation interfaces such as AUTOMATIC1111 and dedicated enhancement software. Good results depend on choosing the right strength for the damage level and on checking the output at full size.

Source conditionRecommended approachReason
Mild blur, good lightingLow strength or high fidelityLittle detail needs inventing
Small face in group photoModerate strength, check each faceDetail below 64 pixels is mostly guessed
Old scanned printScratch removal first, then restorationDamage confuses the detector
Compressed videoTemporal-aware model or low strengthFrame-by-frame output flickers
AI-generated portraitLight pass after generationFixes distorted eyes and teeth
Choosing settings by source condition

A reliable practice is to blend the restored face with the original at 50 to 80 percent opacity. This keeps the authentic grain and lighting while still gaining clarity, and it reduces the over-processed look that viewers notice immediately.

Limitations, risks and ethical concerns

The central limitation is that face restoration invents information. When the input contains only a few pixels per eye, the model fills the gap with what faces in its training data usually look like, which can shift age, ethnicity or expression toward dataset averages.

  • Identity drift: the restored person may resemble someone else, which matters for family archives and especially for forensic or legal use.
  • Dataset bias: models trained mainly on certain demographics restore other faces less accurately.
  • Temporal flicker: applying an image model to video frame by frame produces unstable features.
  • Uncanny smoothness: excessive strength removes pores, wrinkles and natural asymmetry.
  • Misleading evidence: restored surveillance stills must never be treated as proof of identity.

Professional archives therefore label restored images clearly and keep the unaltered original alongside every enhanced version.

In everyday language

Face restoration is like a skilled portrait artist who looks at a blurry photo and redraws the face clearly. The AI has studied millions of faces. It knows how eyes, lips and skin usually look.

When a picture is too small or damaged, the program fills in the missing parts with its best educated guess. The result often looks sharp and natural. But it is a guess, so the face may not be exactly right. That is why it suits family photos better than evidence.

Seen in the real world

A regional history museum digitizes about 3,000 portrait prints from the 1920s to the 1950s. Many are faded, scratched and slightly out of focus. The digitization team scans each print at 1,200 dpi, removes dust and scratches with a separate inpainting step and then runs a codebook-based face restoration model with a fidelity weight of 0.7.

Each restored face is blended back at 70 percent opacity so that the original grain remains visible. Curators review every portrait at full size and reject results where the eye shape or hairline changed. Roughly one in ten images is returned to the unrestored scan. The online collection shows the enhanced version next to the original, and visitors identify several previously unknown relatives, while the museum keeps a clear record of what was altered.