Skip to content

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

Open
@dvapan

Description

@dvapan

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').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions