Free AI Photos and Videos Restoration

dahuang TutorialsComments478Read

Complete tutorial:

We recommend installing an open-source project called CodeFormer, available at:

Installation Process:

1.Install Miniconda, download it from:

2.Download zip file from

Download the zip file from, unzip it, and place it in your user folder at C:\Users. Rename the folder to "CodeFormer".

3.Install other dependencies:

Search for "anaconda prompt" in the bottom-left corner of your computer, open it, and then enter the following commands:

cd CodeFormer
conda create -n codeformer python=3.10 -y
conda activate codeformer

Install PyTorch, visit:

Choose according to your computer; for Windows, the default option usually works. Then copy and run a code similar to the following in the anaconda prompt:

pip3 install torch torchvision torchaudio --index-url

Proceed with the following commands for installation:

pip install -r requirements.txt
python basicsr/ develop
python scripts/ facelib
python scripts/ CodeFormer
conda install -c conda-forge ffmpeg


First, enter the environment:

cd CodeFormer
conda activate codeformer

Facial restoration:

python -w 0.5 --has_aligned --input_path [input_folder]

Overall image enhancement:

python -w 0.7 --input_path [input_folder]

Video restoration:

python --bg_upsampler realesrgan --face_upsample -w 1.0 --input_path full_video_path

Project Removal:

If you no longer need the project, follow these steps:

1.Open Anaconda Prompt and enter the command:

conda remove --name codeformer --all

2.Delete the CodeFormer folder.

3.If you no longer need Miniconda, you can uninstall it as well.

Please remember our website:
  • by Published on 2024年1月11日 22:10:11
Comments  0  Guest  0



:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: