mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-20 01:48:21 +02: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
|
// set the textbox as focused on start
|
||||||
promptField.focus()
|
promptField.focus()
|
||||||
promptField.selectionStart = promptField.value.length
|
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",
|
"refreshModels",
|
||||||
this.bind(function(e) {
|
this.bind(function(e) {
|
||||||
// reload the models
|
// reload the models
|
||||||
this.inputModels = modelsOptions[this.modelKey]
|
|
||||||
this.inputModels = []
|
this.inputModels = []
|
||||||
let modelKeys = Array.isArray(this.modelKey) ? this.modelKey : [this.modelKey]
|
let modelKeys = Array.isArray(this.modelKey) ? this.modelKey : [this.modelKey]
|
||||||
for (let i = 0; i < modelKeys.length; i++) {
|
for (let i = 0; i < modelKeys.length; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user