mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-23 00:33:28 +01:00
Fix 'Use Upscaling' dropdown getting blank on False.
This commit is contained in:
parent
d5f854d376
commit
d04aa89812
@ -130,8 +130,14 @@ const TASK_MAPPING = {
|
||||
},
|
||||
use_upscale: { name: 'Use Upscaling',
|
||||
setUI: (use_upscale) => {
|
||||
useUpscalingField.checked = Boolean(use_upscale)
|
||||
const oldVal = upscaleModelField.value
|
||||
upscaleModelField.value = use_upscale
|
||||
if (upscaleModelField.value) { // Is a valid value for the field.
|
||||
useUpscalingField.checked = true
|
||||
} else { // Not a valid value, restore the old value and disable the filter.
|
||||
upscaleModelField.value = oldVal
|
||||
useUpscalingField.checked = false
|
||||
}
|
||||
},
|
||||
readUI: () => (useUpscalingField.checked ? upscaleModelField.value : undefined),
|
||||
parse: (val) => val
|
||||
|
Loading…
Reference in New Issue
Block a user