Favicon of CodeFormer

CodeFormer

Local AI face restoration software for photos and videos, with adjustable fidelity and image quality, built on PyTorch and CUDA.

Screenshot of CodeFormer website

CodeFormer restores degraded faces in photos and videos for people working with damaged images and researchers developing face restoration tools. Its quality control lets you balance a cleaner result against fidelity to the input face.

  • Face restoration: Process whole photographs or cropped, aligned faces to generate facial detail from degraded inputs.
  • Quality and fidelity control: Adjust how strongly the result preserves the input's appearance versus favoring the model's learned facial details.
  • Video enhancement: Use video input to restore faces across footage.
  • Inpainting and colorization: Repair missing areas or add color to cropped, aligned face images.

Restoration can generate plausible details rather than recover exactly what was in the original image. Whole-photo processing blends restored faces into the background, which can damage hair texture around the face boundary.

The Python implementation processes images locally using PyTorch and CUDA, and pretrained models are available to download. Hugging Face, Replicate and OpenXLab provide hosted demos as alternatives to running it on your own hardware. Training code and configuration files are also available for researchers.

CodeFormer provides downloadable pretrained restoration weights and source installation; its GitHub release is v0.1.0. The NTU S-Lab License 1.0 permits noncommercial use and requires separate permission for commercial use.

Similar to CodeFormer