Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: select face restoration model through image generation API #7352

Open
1 task done
MaikoTan opened this issue Jan 29, 2023 · 1 comment
Open
1 task done
Labels
enhancement New feature or request

Comments

@MaikoTan
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Currently we have CodeFormer and GFPGAN as face restoration models, but you could only select them in the Settings page.
When we are using txt2img or img2img with face restoration through API, it is painful and insecure to change config through API before requesting the image generation.
I think we could make the existing restore_face property in API as a string field that has 2 valid value: CodeFormer and GFPGAN.

Proposed workflow

  1. Remove the existing Face Restoration Model in Settings page
  2. Change the existing Restore Face checkbox to a dropdown contains None, CodeFormer and GFPGAN
  3. Change the restore_face in txt2img function and img2img function from bool to str | None
  4. Change the modules/face_restoration.py to receive the model name instead of reading from shared.opts
  5. Change the modules/processing.py to pass face restoration models into the restore_face function described in 4)

Additional information

No response

@MaikoTan MaikoTan added the enhancement New feature or request label Jan 29, 2023
@MaikoTan
Copy link
Contributor Author

This feature we need for our plugin that supports webui and stable horde, both support GFPGAN and CodeFormer, but with different parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant