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

Fix Required: Weight Loading Path in gfpgan/utils.py for facexlib #442

Open
dvapan opened this issue Sep 13, 2023 · 0 comments · May be fixed by #467
Open

Fix Required: Weight Loading Path in gfpgan/utils.py for facexlib #442

dvapan opened this issue Sep 13, 2023 · 0 comments · May be fixed by #467

Comments

@dvapan
Copy link

dvapan commented Sep 13, 2023

facexlib loads weights into a relative directory instead of the directory containing the .py file. To fix this easily, in the gfpgan/utils.py file during the constructor call:

79  self.face_helper = FaceRestoreHelper(
80      upscale,
81      face_size=512,
82      crop_ratio=(1, 1),
83      det_model='retinaface_resnet50',
84      save_ext='png',
85      use_parse=True,
86      device=self.device,
87      model_rootpath='gfpgan/weights')

Replace model_rootpath='gfpgan/weights' with os.path.join(ROOT_DIR, 'gfpgan/weights').

@hungtooc hungtooc linked a pull request Nov 14, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant