Remove gfpgan_dir

+ Update GFPGAN Model Path Defaults
>  Update them to match the new file heirarchy
This commit is contained in:
blessedcoolant
2022-11-11 11:55:03 +13:00
committed by Lincoln Stein
parent 45e5053d06
commit fd67df9447
8 changed files with 45 additions and 71 deletions

View File

@ -809,7 +809,7 @@ def load_face_restoration(opt):
from ldm.invoke.restoration import Restoration
restoration = Restoration()
if opt.restore:
gfpgan, codeformer = restoration.load_face_restore_models(opt.gfpgan_dir, opt.gfpgan_model_path)
gfpgan, codeformer = restoration.load_face_restore_models(opt.gfpgan_model_path)
else:
print('>> Face restoration disabled')
if opt.esrgan:

View File

@ -487,14 +487,8 @@ def create_argv_parser():
parser.add_argument(
'--gfpgan_model_path',
type=str,
default='experiments/pretrained_models/GFPGANv1.3.pth',
help='Indicates the path to the GFPGAN model, relative to --gfpgan_dir.',
)
parser.add_argument(
'--gfpgan_dir',
type=str,
default='./src/gfpgan',
help='Indicates the directory containing the GFPGAN code.',
default='./models/gfpgan/GFPGANv1.4.pth',
help='Indicates the path to the GFPGAN model.',
)
parser.add_argument(
'--web',

View File

@ -448,15 +448,15 @@ def download_gfpgan():
for model in (
[
'https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth',
'models/gfpgan/GFPGANv1.4.pth'
'./models/gfpgan/GFPGANv1.4.pth'
],
[
'https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth',
'models/gfpgan/weights/detection_Resnet50_Final.pth'
'./models/gfpgan/weights/detection_Resnet50_Final.pth'
],
[
'https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth',
'models/gfpgan/weights/parsing_parsenet.pth'
'./models/gfpgan/weights/parsing_parsenet.pth'
],
):
model_url,model_dest = model