Use gfpgan as the default model for face restoration

This commit is contained in:
cmdr2
2023-06-08 15:52:41 +05:30
parent 5398765fd7
commit 4f799a2bf0
2 changed files with 7 additions and 1 deletions

View File

@ -2061,3 +2061,10 @@ prettifyInputs(document)
// set the textbox as focused on start
promptField.focus()
promptField.selectionStart = promptField.value.length
// use gfpgan as the default model for face restoration
document.addEventListener("refreshModels", function() {
let gfpganIdx = gfpganModelField.inputModels.findIndex((e) => e.toLowerCase().startsWith("gfpgan"))
let gfpganElem = gfpganModelField.modelElements[gfpganIdx]
gfpganModelField.selectModelEntry(gfpganElem)
})