TencentARC / GFPGAN

GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.
Other
35.46k stars 5.88k forks source link

Problem with output. #252

Closed Aspector1 closed 2 years ago

Aspector1 commented 2 years ago

Good evening! When I use gfpgan, in the restored_imgs folder it gives me a cropped face and everything else is black. What should I do?

I'm using GFPGAN 1.3

It's look like this: 10045

differentprogramming commented 2 years ago

same

differentprogramming commented 2 years ago

Fixed it

Change:

        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',
            model=model,
            tile=args.bg_tile,
            tile_pad=10,
            pre_pad=0,
            half=True)  # need to set False in CPU mode

to: bg_upsampler = RealESRGANer( scale=2, model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth', model=model, tile=args.bg_tile, tile_pad=10, pre_pad=0, half=False) # need to set False in CPU mode

Aspector1 commented 2 years ago

Fixed it

Change:

        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',
            model=model,
            tile=args.bg_tile,
            tile_pad=10,
            pre_pad=0,
            half=True)  # need to set False in CPU mode

to: bg_upsampler = RealESRGANer( scale=2, model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth', model=model, tile=args.bg_tile, tile_pad=10, pre_pad=0, half=False) # need to set False in CPU mode

Oh, thank you so much!

differentprogramming commented 2 years ago

The point of it is that some gpus don't support half precision numbers. My 1660 ti being one of them.