SuperAPI AI Directory

sczhou/codeformer

CodeFormer is a face restoration algorithm developed by sczhou that can be used to restore faces in old photos or AI-generated faces, and can also be used to improve Stable Diffusion generation results. The model provides API access on Replicate, costing approximately $0.0051 per run (about 196 runs per $1, varying with input), runs on Nvidia L40S GPU, and predictions typically complete within 6 seconds. It is also an open-source project that can be run locally via Docker. The project is based on the NeurIPS 2022 paper "Towards Robust Blind Face Restoration with Codebook Lookup Transformer", uses the S-Lab License 1.0, non-commercial use must comply with that license, and the Replicate API may not be used for commercial purposes.

Open website

About this tool

CodeFormer is an algorithm model for face restoration, released by sczhou, whose core purpose is to restore faces in old photos or repair AI-generated face images. According to the official description, it can also be used to improve Stable Diffusion generation results.

Main capabilities:

  • Face restoration for old photos;
  • AI-generated face restoration;
  • Assisting in improving Stable Diffusion generation results.

Usage:

  • Run the model via API on Replicate;
  • The model is an open-source project and can be run on your own computer using Docker;
  • The official project also provides GitHub code and a Colab Demo for local or online trial.

Runtime and cost:

  • Running on Replicate costs approximately $0.0051, or about 196 runs per $1, with the specific cost varying with input;
  • Runs on Nvidia L40S GPU hardware;
  • Predictions typically complete within 6 seconds.

Use cases: Suitable for users who need to restore faces in old photos, process AI-generated faces, or improve face quality in Stable Diffusion workflows.

Limitations and license:

  • The web demo is for research purposes only;
  • The project uses the S-Lab License 1.0, and non-commercial redistribution and use must comply with that license;
  • The CodeFormer API on Replicate may not be used for commercial purposes.

Technical background: The method corresponds to the paper "Towards Robust Blind Face Restoration with Codebook Lookup Transformer" (NeurIPS 2022), and the official project provides links to the paper, project homepage, and video.