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

How to run the demo on pytorch 1.4.0 or 1.1.0? #14

Closed
willyzw1221 opened this issue Jul 6, 2021 · 2 comments
Closed

How to run the demo on pytorch 1.4.0 or 1.1.0? #14

willyzw1221 opened this issue Jul 6, 2021 · 2 comments

Comments

@willyzw1221
Copy link

No description provided.

@xinntao
Copy link
Member

xinntao commented Jul 7, 2021

I have not tested it on pytorch1.4 or 1.1.
You may adapt to that version.

@xinntao xinntao closed this as completed Jul 12, 2021
@remixer-dec
Copy link

I managed to run it with Pytorch 1.3 since it's the latest build that supports my GPU. Windows 8.1, Python 3.7, CUDA 10.2
You need to:

  1. Install basicsr, I already had it installed. If I remember correctly, I cloned the repo and modified requirements.txt to change pytorch version, and executed pip install -e /path/to/basicsr
    If you have version error with basicsr, just remove the line with version from basicsr/__init__.py
  2. Run pip install ninja
  3. Go to your python installation path, lib/site-packages/ and fix torch/hub.py , add
def get_dir():
    return hub_dir 
#required by facexlib,  implemented only in Pytorch 1.6+
  1. Run pip install facexlib
  2. Edit requirements.txt to exclude fresh pytorch, then run pip install -r requirements.txt
  3. Similar to step 3, fix torch/utils/cpp_extension.py
  • if you have utf-8 errors, change all decode() to decode('encoding-for-your-spoken-language')
  • in function _prepare_ldflags add extra_ldflags.append('c10_cuda.lib') near the other similar lines
  1. Run set BASICSR_JIT=True
  2. Run the py script from the Command Line Prompt of VS[YEAR] x64 Native Tools (Visual Studio Build Tools)

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

3 participants