LibreAI / Image / CodeFormer
// image · sczhou/CodeFormer

CodeFormer

[NeurIPS 2022] Towards Robust Blind Face Restoration with Codebook Lookup Transformer

★ 18.2k stars⑂ 3.7k forksCustom (check repo)updated 2025-11
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

CodeFormer is an open-source image project by sczhou (sczhou/CodeFormer on GitHub). It has 18,171 GitHub stars and 3,725 forks, is released under the Custom (check repo) license, and was last updated on GitHub on 18 November 2025.

GitHub stars
18,171
Forks
3,725
License
Custom (check repo)
Last updated on GitHub
18 November 2025
Category
Image
Listing
Full install guide
Official site
Read the docs
// how it works

How it works

  1. Choose the right tool

    Generation studio, upscaler, background remover, or photo library — match the tool to the task.

  2. Install it your way

    Desktop apps, Docker images, and portable builds cover most platforms; pick the simplest for your OS.

  3. Add models if needed

    Generation tools need checkpoint files; utilities like upscalers usually bundle everything.

  4. Create or organize

    Generate, enhance, or import — then export, share, or keep building your library.

// features

Why people love it

No subscriptions

The defining trait of this whole category: professional results without monthly fees.

Runs locally

Your images stay on your machine — important for client work and privacy.

Model freedom

Bring any compatible open checkpoint; you are never locked to one vendor's style.

Purpose-built utilities

Single-job tools (upscale, de-background, restore) that do one thing excellently.

Smart photo libraries

Self-hosted managers with AI tagging, face recognition, and deduplication.

Extensible ecosystems

Extensions, scripts, and community presets extend the popular studios far beyond stock.

Advertisement
// run it

Run it yourself

  1. Step 1 — Clone the repo

    Download the source and move into the project folder.

    git clone https://github.com/sczhou/CodeFormer.git
    cd CodeFormer
  2. Step 2 — Create an environment

    Isolate dependencies so nothing clashes with your other projects.

    python -m venv .venv
    source .venv/bin/activate  # Windows: .venv\Scripts\activate
  3. Step 3 — Install and launch

    Install the requirements, then follow the README's launch command (it varies per project).

    pip install -r requirements.txt
// use cases

What you can build

Advertisement
// faq

Questions, answered

Which should I start with?

For generation: a polished studio interface. For enhancement: a dedicated upscaler. For libraries: a photo manager. The guides above narrow it down.

Do I need a powerful GPU?

Generation benefits hugely from one; upscalers and photo managers are far lighter.

Who maintains CodeFormer?

It is an open-source project at sczhou/CodeFormer with 3,725 forks. Check the repo's contributors and recent commits to see how active maintenance is.

Are they free for commercial work?

Mostly yes under MIT/Apache/GPL — but verify each license, especially for client deliverables.

Can they match Midjourney quality?

With the right open checkpoints, absolutely — the interface matters less than the model you load.

Where do models come from?

Community hubs like CivitAI and Hugging Face host thousands of open checkpoints.

// keep exploring

Similar tools

Image

Insightface

State-of-the-art 2D and 3D Face Analysis Project

★ 29.9k starsCustom (check repo)
View guide →
Image

Fooocus

Focus on prompting and generating

★ 53.3k starsGPL-3.0
View guide →
Image

Real-ESRGAN

Real-ESRGAN — practical blind super-resolution for real-world photos and video: restores and upscales degraded images with models trained on pure synthetic data, BSD-3-Clause

★ 37.1k starsBSD-3-Clause
View guide →
Image

mmagic

MMagic — OpenMMLab's generative-AI toolbox: diffusion, text-to-image, restoration and a model zoo.

★ 7.5k starsApache-2.0
View guide →
Image

MirrorMetrics

Visual diagnostics for LoRA training — spot overfitting with face biometrics

★ 62 starsMIT
View guide →
// alternatives

Alternatives in Image

The most-starred other Image projects in the LibreAI catalogue — the realistic shortlist if CodeFormer is not the right fit.

Get CodeFormer

Free and open — grab the source, star the repo, and start creating.