mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2026-04-19 04:10:47 +00:00
How do I use GPU for the enhancement process ? #440
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Konohamaru04 on GitHub (Jan 28, 2024).
It seems like it is using CPUfor face restoration. On CPU it's slow if there are bulk images. So, looking for a way to use GPU for faster result.
@Konohamaru04 commented on GitHub (Jan 28, 2024):
nvm. I figured it out.
steps :
pip uninstall torch
conda create --name gfpgan_cuda
conda activate gfpgan_cuda
conda config --append channels conda-forge
conda install cudatoolkit
pip install torch>=1.13.0+cu116 torchvision>=0.13.0+cu116 torchaudio>=0.13.0 --extra-index-url https://download.pytorch.org/whl/cu116