How do I use GPU for the enhancement process ? #440

Closed
opened 2026-01-29 21:47:45 +00:00 by claunia · 1 comment
Owner

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.

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.
Author
Owner

@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

@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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#440