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.