Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

facexlib without CUDA #5

Closed
nihirv opened this issue Aug 3, 2021 · 4 comments
Closed

facexlib without CUDA #5

nihirv opened this issue Aug 3, 2021 · 4 comments

Comments

@nihirv
Copy link
Contributor

nihirv commented Aug 3, 2021

Hey,

I'm using this because I'm interested in testing out the GFPGAN repo. However I'd like to run this on a CPU version of torch only. Since we're performing inference and not training, would you be able to support this?

Thanks for the fantastic work though btw :)

@nihirv
Copy link
Contributor Author

nihirv commented Aug 3, 2021

Hmm, I made the change in utils/face_restoration_helper.py > FaceRestoreHelper > __init__, and was planning on opening a pr, but it seems that the basicsr library needs CUDA drivers too. Still, it's only a one line change and those who want to use facexlib without GPU might benefit from it, so I'll open a pr

@xinntao
Copy link
Owner

xinntao commented Aug 3, 2021

  1. The current GFPGAN requires GPU, so it may not available for CPU inference. We may add a CPU-support model later.
  2. I think BasicSR can support CPU only. (if we do not use those cuda extensions.)
  3. Thanks, it is better to add an option for supporting CPU

@nihirv
Copy link
Contributor Author

nihirv commented Aug 3, 2021

  1. Yes please - that'd be great. Is it the StyleGAN part which needs the GPU?
  2. I'm getting a: "OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root." through basicsr\ops\dcn\deform_conv.py", line 14 inside the if BASICSR_JIT == 'True': flag
  3. PR opened (it's not a flag, just a device check): adds auto support for CPU in Face Restore Helper #6

@xinntao
Copy link
Owner

xinntao commented Aug 8, 2021

@nihirv

  1. The StyleGAN needs customized CUDA(with GPU) extensions. So the original model requires GPU. I have updated a new version which does not require such CUDA extensions. So the GFPGAN can be run with CPU/ or run on windows. See the updates in : https://github.com/TencentARC/GFPGAN
  2. I have merged the PR. Thanks. :-)

@xinntao xinntao closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants