mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-22 00:03:20 +01:00
Use gfpgan as the default model for face restoration
This commit is contained in:
parent
5398765fd7
commit
4f799a2bf0
@ -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)
|
||||
})
|
||||
|
@ -103,7 +103,6 @@ class ModelDropdown {
|
||||
"refreshModels",
|
||||
this.bind(function(e) {
|
||||
// reload the models
|
||||
this.inputModels = modelsOptions[this.modelKey]
|
||||
this.inputModels = []
|
||||
let modelKeys = Array.isArray(this.modelKey) ? this.modelKey : [this.modelKey]
|
||||
for (let i = 0; i < modelKeys.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user