Allow to define model_rootpath for FaceRestoreHelper #362

Closed
opened 2026-01-29 21:47:11 +00:00 by claunia · 2 comments
Owner

Originally created by @henryruhs on GitHub (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.

Originally created by @henryruhs on GitHub (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.
Author
Owner

@hungtooc commented on GitHub (Nov 14, 2023):

need to fix this bug soon

@hungtooc commented on GitHub (Nov 14, 2023): need to fix this bug soon
Author
Owner

@henryruhs commented on GitHub (Nov 15, 2023):

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

@henryruhs commented on GitHub (Nov 15, 2023): @hungtooc Check https://github.com/harisreedhar/Face-Upscalers-ONNX ... models can be downloaded under releases
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#362