CodeFormer is a face restoration project based on the NeurIPS 2022 paper “Towards Robust Blind Face Restoration with Codebook Lookup Transformer.” It is designed to improve degraded, old, low-quality, or AI-generated face images without requiring a clean reference image. The model uses a codebook lookup transformer approach to balance perceptual quality and identity fidelity through a configurable fidelity weight. It supports cropped face restoration, whole-image enhancement, video enhancement, face colorization, and face inpainting. The repository provides pretrained model download scripts, inference commands, training code, and configuration files. It is useful for research, restoration workflows, creative tooling, and applications that need robust face recovery from poor visual inputs.
Features
- Blind face restoration
- Codebook lookup transformer model
- Adjustable fidelity weight
- Whole-image and video enhancement
- Face colorization support
- Face inpainting support