Hair cut off #330

Open
opened 2026-01-29 21:46:54 +00:00 by claunia · 7 comments
Owner

Originally created by @CommanderLake on GitHub (Mar 30, 2023).

I'm using 1.4 with amazing results but where it crops the faces it cuts off half of the hair and there's a plainly visible line where sharp turns to blurry, can i make it expand the face crop to include the hair?

Originally created by @CommanderLake on GitHub (Mar 30, 2023). I'm using 1.4 with amazing results but where it crops the faces it cuts off half of the hair and there's a plainly visible line where sharp turns to blurry, can i make it expand the face crop to include the hair?
Author
Owner

@CommanderLake commented on GitHub (Mar 30, 2023):

Capture

@CommanderLake commented on GitHub (Mar 30, 2023): ![Capture](https://user-images.githubusercontent.com/55424861/228941077-2729ad3a-2311-495f-bacc-773b9a7cc6da.PNG)
Author
Owner

@Loacoon1 commented on GitHub (Jul 18, 2023):

I have the same problem... I believe that everyone does. Couldn't figure out a way to solve this. It should either include all the hair or none. The way it actually is the photos are mostly unusable sadly.
Sadly this project seems pretty much abandoned...

@Loacoon1 commented on GitHub (Jul 18, 2023): I have the same problem... I believe that everyone does. Couldn't figure out a way to solve this. It should either include all the hair or none. The way it actually is the photos are mostly unusable sadly. Sadly this project seems pretty much abandoned...
Author
Owner

@Luzifr commented on GitHub (Jul 27, 2023):

I found that also other image enhancer + upscaler AI webpages have similar problems, like https://replicate.com/tencentarc/gfpgan. Probably they all use same/similar models. But the border between sharp and blurry hair is not so clear on other models, it seems. Strange thing here is, that the line is always slanted, never exactly horizontal. I wonder why. Too sad this model has this flaw, it's the only image enhancer which has this great nearly freely adjustable upscaling functionality! And i need that really often.

@Luzifr commented on GitHub (Jul 27, 2023): I found that also other image enhancer + upscaler AI webpages have similar problems, like https://replicate.com/tencentarc/gfpgan. Probably they all use same/similar models. But the border between sharp and blurry hair is not so clear on other models, it seems. Strange thing here is, that the line is always slanted, never exactly horizontal. I wonder why. Too sad this model has this flaw, it's the only image enhancer which has this great nearly freely adjustable upscaling functionality! And i need that really often.
Author
Owner

@sutte commented on GitHub (Mar 23, 2024):

This problem is caused by facexlib, the algorithm of mask blur is not well.
So we can replace it with facelib(from codeformer).
We need to replace 2 files : facexlib/utils/face_restoration_helper.py, misc.py.
Then the problem will be solved

@sutte commented on GitHub (Mar 23, 2024): This problem is caused by facexlib, the algorithm of mask blur is not well. So we can replace it with facelib(from codeformer). We need to replace 2 files : facexlib/utils/face_restoration_helper.py, misc.py. Then the problem will be solved
Author
Owner

@johnbilnn commented on GitHub (May 9, 2024):

Can you be more specific please? I'd really appreciate it

@johnbilnn commented on GitHub (May 9, 2024): Can you be more specific please? I'd really appreciate it
Author
Owner

@sutte commented on GitHub (May 10, 2024):

You can download facelib from https://github.com/sczhou/CodeFormer,
then replace 2 files: face_restoration_helper.py and misc.py,
2 files are in the following path: %Your Python Path%/Lib/site-packages/facexlib/utils

@sutte commented on GitHub (May 10, 2024): You can download facelib from https://github.com/sczhou/CodeFormer, then replace 2 files: face_restoration_helper.py and misc.py, 2 files are in the following path: %Your Python Path%/Lib/site-packages/facexlib/utils
Author
Owner

@LecterXIV commented on GitHub (Oct 15, 2024):

Same issue with CodeFormer. It crops the image to 512x512 to restore the image, and everything outside will be blurred.

@LecterXIV commented on GitHub (Oct 15, 2024): Same issue with CodeFormer. It crops the image to 512x512 to restore the image, and everything outside will be blurred.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#330