[Feature Request]: select face restoration model through image generation API #7352
Open
1 task done
Labels
enhancement
New feature or request
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 using
txt2img
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 existing
restore_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
The text was updated successfully, but these errors were encountered: