AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.14k stars 26.41k forks source link

Include RestoreFormer #1673

Open CamiloMM opened 1 year ago

CamiloMM commented 1 year ago

Could you consider including RestoreFormer as a face restoration step? (It's unrelated to CodeFormer, despite its name).

Their results are state of the art and I'd love to have it as an option. The guys behind GFPGAN have added RestoreFormer inference code so maybe you can just yoink that.

fabeschan commented 1 year ago

+1 would be great to have it

mo95 commented 1 year ago

Their results are state of the art and I'd love to have it as an option.

@CamiloMM Sorry I can't say RestoreFormer is the state of the art. In my previous tests, RestoreFormer performs worse than GFPGAN and CodeFormer in most cases. Here are some of my results:

com_12 sb_com_007 cmp_04

I compared them using the GFPGAN and Codeformer demo on Hugging Face, I'm not sure if there is something wrong @CamiloMM

GFPGAN and Restoreformer demo: https://huggingface.co/spaces/Xintao/GFPGAN Codeformer demo: https://huggingface.co/spaces/sczhou/CodeFormer

CamiloMM commented 1 year ago

Well, state-of-the-art were clearly strong words haha. While I definitely agree that on your first and second examples CodeFormer did a better job than RestoreFormer, that third one illustrates how sometimes just the fact that they're different can fix something. Compare the boy's teeth between both. image (top RF, bottom CF, 4x bicubic) In general I just think having the option does good, I usually flip between GFPGAN and CodeFormer for that reason. None of them are really correct, we just cherry pick the best wrong result.

mo95 commented 1 year ago

👍 @CamiloMM, GFPGAN and CodeFormer are overall much better than RestoreFormer for me haha, I don't need this option, but it will be useful to someone else.

mr-september commented 1 month ago

RestoreFormer has been improved (RestoreFormer++).

Hoping to revive this issue and add support.