[X] 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
Remove the existing Face Restoration Model in Settings page
Change the existing Restore Face checkbox to a dropdown contains None, CodeFormer and GFPGAN
Change the restore_face in txt2img function and img2img function from bool to str | None
Change the modules/face_restoration.py to receive the model name instead of reading from shared.opts
Change the modules/processing.py to pass face restoration models into the restore_face function described in 4)
Is there an existing issue for this?
What would your feature do ?
Currently we have
CodeFormer
andGFPGAN
as face restoration models, but you could only select them in the Settings page. When we are usingtxt2img
orimg2img
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 existingrestore_face
property in API as a string field that has 2 valid value:CodeFormer
andGFPGAN
.Proposed workflow
Face Restoration Model
in Settings pageRestore Face
checkbox to a dropdown containsNone
,CodeFormer
andGFPGAN
restore_face
intxt2img
function andimg2img
function frombool
tostr | None
modules/face_restoration.py
to receive the model name instead of reading fromshared.opts
modules/processing.py
to pass face restoration models into therestore_face
function described in 4)Additional information
No response