Black Background, with enhanced face #198

Open
opened 2026-01-29 21:45:36 +00:00 by claunia · 9 comments
Owner

Originally created by @AntonHarboe on GitHub (Jun 27, 2022).

Hi, i have been having this issue where i upscale the picture, then when i look in my output folder, there is just pictures with a black background with the face on the specific spot it should be. pls help

Originally created by @AntonHarboe on GitHub (Jun 27, 2022). Hi, i have been having this issue where i upscale the picture, then when i look in my output folder, there is just pictures with a black background with the face on the specific spot it should be. pls help
Author
Owner

@gerrith commented on GitHub (Jul 31, 2022):

The same here:

image

Not sure what I've changed, the day before it was working ok. I think it started after I've installed Real-ESRGAN.

@gerrith commented on GitHub (Jul 31, 2022): The same here: ![image](https://user-images.githubusercontent.com/2377224/182046880-d3d2e2aa-ca3b-43ed-8270-659bd2537745.png) Not sure what I've changed, the day before it was working ok. I think it started after I've installed [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN).
Author
Owner

@fogostudio commented on GitHub (Aug 24, 2022):

same problem

@fogostudio commented on GitHub (Aug 24, 2022): same problem
Author
Owner

@GordonFreeeman commented on GitHub (Aug 30, 2022):

Anyone managed to find a solution? I'm having the same issue, but no Real-ESRGAN installed. I had a problem with blank green screen generation in Stable Diffusion, that was related to fp16 not working on my 1660 Ti, could this be something similar? And if so, does anyone know how to switch to fp32 (if this is even relevant at all)?
image

@GordonFreeeman commented on GitHub (Aug 30, 2022): Anyone managed to find a solution? I'm having the same issue, but no Real-ESRGAN installed. I had a problem with blank green screen generation in Stable Diffusion, that was related to fp16 not working on my 1660 Ti, could this be something similar? And if so, does anyone know how to switch to fp32 (if this is even relevant at all)? ![image](https://user-images.githubusercontent.com/101097712/187377258-1b703de5-0285-4586-8c72-92dfa8003757.png)
Author
Owner

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

same

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

@RupertAvery commented on GitHub (Sep 10, 2022):

I got this problem too after setting up my environment with CUDA "properly" so that torch detected it. I have a GTX 1650 with 4GB VRAM.

I was able to fix this by editing inference_gfpgan.py and setting half=False with RealESRGANer, so it is probably like the issue with --fp32 in SD.

            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)  # <-- Set to False instead of True
@RupertAvery commented on GitHub (Sep 10, 2022): I got this problem too after setting up my environment with CUDA "properly" so that torch detected it. I have a GTX 1650 with 4GB VRAM. I was able to fix this by editing `inference_gfpgan.py` and setting `half=False` with RealESRGANer, so it is probably like the issue with --fp32 in SD. ``` 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) # <-- Set to False instead of True ```
Author
Owner

@cgessai commented on GitHub (Sep 12, 2022):

@RupertAvery Worked perfectly on my GTX 1650- I thought I'd installed pytorch incorrectly. Thank you SO much!

@cgessai commented on GitHub (Sep 12, 2022): @RupertAvery Worked perfectly on my GTX 1650- I thought I'd installed pytorch incorrectly. Thank you SO much!
Author
Owner

@GordonFreeeman commented on GitHub (Sep 12, 2022):

That did it, thank you very much! 🙏

@GordonFreeeman commented on GitHub (Sep 12, 2022): That did it, thank you very much! 🙏
Author
Owner

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

Got the same problem with only black spot on the face
UPDATE- Solved by putting down the image from 16-bit to 8 bits/channel

@ZahirAM commented on GitHub (Nov 14, 2023): Got the same problem with only black spot on the face UPDATE- Solved by putting down the image from 16-bit to 8 bits/channel
Author
Owner

@HexNIK commented on GitHub (Dec 17, 2025):

@RupertAvery

I got this problem too after setting up my environment with CUDA "properly" so that torch detected it. I have a GTX 1650 with 4GB VRAM.

I was able to fix this by editing inference_gfpgan.py and setting half=False with RealESRGANer, so it is probably like the issue with --fp32 in SD.

You've been a great help — thank you from the bottom of my heart.
p.s. NVIDIA GeForce GTX 1660 Ti, CUDA Version: 12.4

@HexNIK commented on GitHub (Dec 17, 2025): @RupertAvery > I got this problem too after setting up my environment with CUDA "properly" so that torch detected it. I have a GTX 1650 with 4GB VRAM. > > I was able to fix this by editing `inference_gfpgan.py` and setting `half=False` with RealESRGANer, so it is probably like the issue with --fp32 in SD. You've been a great help — thank you from the bottom of my heart. p.s. NVIDIA GeForce GTX 1660 Ti, CUDA Version: 12.4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#198