FREEDOM251

Freedom251 › AI Image Restoration Software

CodeFormer

Free plan APIMacSelf-hostedWebWindows

Visit CodeFormer Alternatives

CodeFormer's own site

What CodeFormer is

CodeFormer is a free, open-source project for restoring faces in old photographs and AI-generated images. Its method uses a learned discrete codebook and Transformer-based prediction to reconstruct faces from degraded inputs. A control weight lets users choose a balance between image quality and fidelity: lower values tend toward higher quality, while higher values tend toward greater fidelity.

The project supports face restoration and whole-image enhancement, with optional Real-ESRGAN upsampling for faces and backgrounds. Separate tools can colorize black-and-white or faded cropped faces, and fill in cropped faces marked with a white brush. Its inference script accepts video clips in .mp4, .mov, and .avi formats; Windows and Mac users are instructed to install ffmpeg first.

CodeFormer is available through web, API, and self-hosted routes, and the project lists integrations including Stable Diffusion WebUI, ChaiNNer, and ComfyUI. The setup example uses Python 3.8 and lists PyTorch 1.7.1 or later and CUDA 10.1 or later, alongside packages in requirements.txt. The project uses the NTU S-Lab License 1.0. The Replicate API cannot be used commercially under its stated terms. The project presents CodeFormer as a research method and asks users of its dataset or paper to cite the work.

Who it suits

CodeFormer suits people seeking face restoration for old photos or AI-generated images, as well as users who want whole-image enhancement or face colorization and inpainting tools. Its self-hosted route and listed technical requirements are relevant to users prepared to set up the project locally.

What it does well

  • Free and open source under the NTU S-Lab License 1.0
  • Restores faces and can enhance whole images
  • Weight control balances image quality and fidelity
  • Includes face colorization and inpainting tools
  • Accepts .mp4, .mov, and .avi video clips
  • Lists integrations including Stable Diffusion WebUI, ChaiNNer, and ComfyUI

What to know first

  • Local setup lists PyTorch 1.7.1 or later and CUDA 10.1 or later
  • Whole-image face-background fusion may damage hair texture at the boundary
  • Replicate API use is restricted from commercial use

Limits

For whole-image processing, the face-background fusion step may damage hair texture at the boundary. The Replicate model page says its API cannot be used commercially; redistribution and non-commercial use should follow the NTU S-Lab License 1.0.

Getting started

  1. Open the project website at https://github.com/sczhou/CodeFormer
  2. Choose a web, API, or self-hosted route
  3. For local setup, use the listed PyTorch and CUDA requirements and install packages from requirements.txt
  4. For video inference on Windows or Mac, install ffmpeg first
  5. Use a listed integration such as Stable Diffusion WebUI, ChaiNNer, or ComfyUI

Verdict

Choose CodeFormer if you want a free research project for face restoration, whole-image enhancement, or its additional face tools. Look elsewhere if you need commercial use through the Replicate API, or if its local setup requirements do not suit your environment.

Questions

Is CodeFormer free?

Yes. It is listed as free and open source.

What platforms does it support?

Listed platforms are API, macOS, self-hosted, web, and Windows.

Can it process video?

Its inference script accepts .mp4, .mov, and .avi clips. Windows and Mac users are instructed to install ffmpeg first.

What integrations are listed?

The project lists Stable Diffusion WebUI, ChaiNNer, and ComfyUI. It identifies its Hugging Face, Replicate, and OpenXLab demos as author-maintained deployments.

Can the Replicate API be used commercially?

No. The Replicate model page says its CodeFormer API cannot be used commercially.

What license does CodeFormer use?

It uses the NTU S-Lab License 1.0.

Facts from CodeFormer's own pages

Additional tools
It includes face colorization for black-and-white or faded cropped faces and face inpainting for cropped faces masked with a white brush. · github.com, 4 Oct 2026
API restriction
The Replicate model page says its CodeFormer API cannot be used commercially. · replicate.com, 4 Oct 2026
Colorization and inpainting
Separate scripts provide colorization and inpainting for cropped and aligned face images. · github.com, 11 Oct 2026
Image enhancement
The project supports face restoration and whole-image enhancement, with optional Real-ESRGAN upsampling for faces and backgrounds. · github.com, 4 Oct 2026
Integrations
The project lists Stable Diffusion WebUI, ChaiNNer, and ComfyUI among integrations, and identifies Hugging Face, Replicate, and OpenXLab demos as author-maintained deployments. · github.com, 4 Oct 2026
Intended users
The project page presents CodeFormer as a face-restoration method and provides code and a demo for researchers and other users working with degraded face images. · shangchenzhou.com, 11 Oct 2026
Known limitation
For whole-image processing, the face-background fusion step may damage hair texture at the boundary, according to the repository's comparison note. · github.com, 11 Oct 2026
License
The project uses the NTU S-Lab License 1.0, and the repository says redistribution and use should follow that license. · github.com, 11 Oct 2026
Local requirements
The installation instructions list PyTorch 1.7.1 or later, CUDA 10.1 or later, and additional packages in requirements.txt. · github.com, 11 Oct 2026
Official demos
The authors identify their Hugging Face Space, Replicate, and OpenXLab demos as official deployments they maintain. · github.com, 11 Oct 2026
Purpose
CodeFormer is a Transformer-based method for blind face restoration that predicts codes from low-quality face images. · shangchenzhou.com, 11 Oct 2026
Quality and fidelity control
A scalar weight lets users trade image quality against fidelity, with smaller values tending toward higher quality and larger values toward higher fidelity. · github.com, 11 Oct 2026
Quality control
A controllable weight trades image quality against fidelity, with lower values tending toward higher quality and higher values toward higher fidelity. · shangchenzhou.com, 4 Oct 2026
Requirements
The README lists PyTorch 1.7.1 or later, CUDA 10.1 or later, Python 3.8 in its setup example, and other packages in requirements.txt. · github.com, 4 Oct 2026
Restoration method
It uses a learned discrete codebook and Transformer-based code prediction to restore faces from degraded inputs. · shangchenzhou.com, 4 Oct 2026
Security and compliance
The opened project and demo pages do not state security certifications or compliance standards. · github.com, 4 Oct 2026
Support
The repository directs questions to [email protected]. · github.com, 11 Oct 2026
Third-party integrations
The repository lists integrations including Stable Diffusion WebUI and chaiNNer, and warns that other listed demos and services are third-party. · github.com, 11 Oct 2026
Third-party services
The README identifies other listed demos, APIs, apps, websites, and integrations as third-party and unaffiliated with the authors. · github.com, 4 Oct 2026
Video
The inference script accepts video input, with documented support for .mp4, .mov, and .avi files. · github.com, 11 Oct 2026
Video enhancement
The inference script accepts video clips ending in .mp4, .mov, or .avi; the README says Windows and Mac users should install ffmpeg first. · github.com, 4 Oct 2026
Whole-image enhancement
The project supports enhancing whole images and can use Real-ESRGAN to upsample faces or enhance background regions. · github.com, 11 Oct 2026

Where CodeFormer stands on Freedom251

Look at these too