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

Allow to define model_rootpath for FaceRestoreHelper #399

Open
henryruhs opened this issue Jun 15, 2023 · 2 comments
Open

Allow to define model_rootpath for FaceRestoreHelper #399

henryruhs opened this issue Jun 15, 2023 · 2 comments

Comments

@henryruhs
Copy link

henryruhs commented Jun 15, 2023

Hey, it would be great if all weights could be stored in one directory or set to None:

gfpgan.GFPGANer(
    model_path='weights/GFPGANv1.3.pth',
    model_rootpath='weights'
)

Related code that enforces gfpgan/weights:

self.face_helper = FaceRestoreHelper(
    upscale,
    face_size=512,
    crop_ratio=(1, 1),
    det_model='retinaface_resnet50',
    save_ext='png',
    use_parse=True,
    device=self.device,
    model_rootpath='gfpgan/weights'
)

General speaking, think about giving more control over the FaceRestoreHelper instance.

@hungtooc
Copy link

need to fix this bug soon

@henryruhs
Copy link
Author

@hungtooc Check https://github.com/harisreedhar/Face-Upscalers-ONNX ... models can be downloaded under releases

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