Problem with output. #245

Closed
opened 2026-01-29 21:46:06 +00:00 by claunia · 4 comments
Owner

Originally created by @Aspector1 on GitHub (Sep 5, 2022).

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

Originally created by @Aspector1 on GitHub (Sep 5, 2022). 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](https://user-images.githubusercontent.com/84536195/188515401-49efd2b6-d806-4227-b0c3-4b9ee3c6e804.png)
Author
Owner

@differentprogramming commented on GitHub (Sep 7, 2022):

same

@differentprogramming commented on GitHub (Sep 7, 2022): same
Author
Owner

@differentprogramming commented on GitHub (Sep 7, 2022):

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

@differentprogramming commented on GitHub (Sep 7, 2022): 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
Author
Owner

@Aspector1 commented on GitHub (Sep 7, 2022):

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!

@Aspector1 commented on GitHub (Sep 7, 2022): > 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!
Author
Owner

@differentprogramming commented on GitHub (Sep 7, 2022):

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

@differentprogramming commented on GitHub (Sep 7, 2022): The point of it is that some gpus don't support half precision numbers. My 1660 ti being one of them.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#245