forked from extern/easydiffusion
Fix GFPGAN settings import
The word None which many txt metadata files contain as value for the GFPGAN field should not be considered to be a model name. If the value is None, disable the checkbox
This commit is contained in:
parent
3d7e16cfd9
commit
30dcc7477f
@ -172,6 +172,11 @@ const TASK_MAPPING = {
|
|||||||
name: "Use Face Correction",
|
name: "Use Face Correction",
|
||||||
setUI: (use_face_correction) => {
|
setUI: (use_face_correction) => {
|
||||||
const oldVal = gfpganModelField.value
|
const oldVal = gfpganModelField.value
|
||||||
|
console.log("use face correction", use_face_correction)
|
||||||
|
if (use_face_correction == null || use_face_correction == "None") {
|
||||||
|
gfpganModelField.disabled = true
|
||||||
|
useFaceCorrectionField.checked = false
|
||||||
|
} else {
|
||||||
gfpganModelField.value = getModelPath(use_face_correction, [".pth"])
|
gfpganModelField.value = getModelPath(use_face_correction, [".pth"])
|
||||||
if (gfpganModelField.value) {
|
if (gfpganModelField.value) {
|
||||||
// Is a valid value for the field.
|
// Is a valid value for the field.
|
||||||
@ -183,6 +188,7 @@ const TASK_MAPPING = {
|
|||||||
gfpganModelField.value = oldVal
|
gfpganModelField.value = oldVal
|
||||||
useFaceCorrectionField.checked = false
|
useFaceCorrectionField.checked = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//useFaceCorrectionField.checked = parseBoolean(use_face_correction)
|
//useFaceCorrectionField.checked = parseBoolean(use_face_correction)
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user