logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt
How to install sczhou/CodeFormer. Official installation instructions. Project installation guide. Framework or library installation. Build installation instructions. How to setup and install from GitHub. Installation steps and setup instructions. Official docs and installation instructions GitHub.

sczhou/CodeFormer Installation Guide

How to install sczhou/CodeFormer. Official project installation instructions and setup guide.

Automated Install (Recommended)

Quick installation instructions for sczhou/CodeFormer. This is the fastest way to complete project installation and setup.

Install via curl

curl -fsSL https://hexmos.com/ipm-install | bash && 
ipm i sczhou/CodeFormer
or

Install via npx

npx @hexmos/ipm i sczhou/CodeFormer

Prerequisites

Python

language

Version: >=3.8.0

PyTorch

package_manager

Version: 1.7.1

CUDA

system_tool

Version: >=10.1

dlib

package_manager

Version: 1.0.2

pip

package_manager

Version: 23.1.1

Manual Installation Methods

Manual installation instructions. How to install from GitHub source.

Conda Environment and Dependencies

git clone https://github.com/sczhou/CodeFormer.git

cd CodeFormer

conda create -n codeformer python=3.8 -y

conda activate codeformer

pip install -r requirements.txt

python basicsr/setup.py develop

Install Dlib for Face Detection

conda install -c conda-forge dlib

Download Pre-trained Models

python scripts/download_pretrained_models.py facelib

python scripts/download_pretrained_models.py dlib

Inference with CodeFormer

python inference_codeformer.py -w 0.5 --has_aligned --input_path [image folder]|[image path]

Face Colorization

python inference_colorization.py --input_path [image folder]|[image path]

Face Inpainting

python inference_inpainting.py --input_path [image folder]|[image path]

Post Installation Steps

  • Start the server using `python scripts/server.py`.
  • Run migrations with `python manage.py makemigrations` and then `python manage.py migrate`.