pq-yang / PGDiff

[NeurIPS 2023] PGDiff: Guiding Diffusion Models for Versatile Face Restoration via Partial Guidance
Other
133 stars 13 forks source link

Problem to use CodeFormer as restorer #4

Closed zuki76 closed 1 year ago

zuki76 commented 1 year ago

Hello author: I'm reading your paper and find the work solid. However, I get a problem to use CodeFormer as the restorer in the task of restoration. I notice that you've done experiments using CodeFormer on ref-based restoration and I wonder:

  1. Is the input of CodeFormer you used in this paper embedded with y_t and t?(like the Real-ESRGAN you used in restoration)
  2. Whether or not, would you like to provide the code and pre-trained model to use CodeFormer as the restorer in this work?

Many thanks.

pq-yang commented 1 year ago

Hi @zuki76 , thanks for your attention! The followings are our suggestions regarding the usage of CodeFormer as the restorer in our PGDiff framework.

  1. The input of CodeFormer is the same as its original input, which means that you only need the input image $y_0$.
  2. As mentioned in Blind Restoration, you only need to write your own create_restorer function to load the model for CodeFormer (refer to here), and specify the released CodeFormer checkpoint --restorer_path accordingly (refer to here).

The above rules also generally apply to other restorers.

Have fun!