Show control image when 'Use these Settings' is used

This commit is contained in:
cmdr2 2023-08-18 17:59:00 +05:30
parent 1d54943d71
commit 8999f9450f

View File

@ -516,6 +516,15 @@ function restoreTaskToUI(task, fieldsToSkip) {
)
initImagePreview.src = task.reqBody.init_image
}
// hide/show controlnet picture as needed
if (IMAGE_REGEX.test(controlImagePreview.src) && task.reqBody.control_image == undefined) {
// hide source image
controlImageClearBtn.dispatchEvent(new Event("click"))
} else if (task.reqBody.control_image !== undefined) {
// listen for inpainter loading event, which happens AFTER the main image loads (which reloads the inpai
controlImagePreview.src = task.reqBody.control_image
}
}
function readUI() {
const reqBody = {}