Move the current implementation of upscale/redo/double size into a custom plugin

This commit is contained in:
cmdr2
2022-10-19 20:27:06 +05:30
parent af05d94198
commit 602686a5d2
2 changed files with 51 additions and 5 deletions

View File

@ -369,13 +369,8 @@ function showImages(reqBody, res, outputContainer, livePreview) {
const buttons = {
'imgUseBtn': { text: 'Use as Input', on_click: onUseAsInputClick },
'imgSaveBtn': { text: 'Download', on_click: onDownloadImageClick },
'imgX2Btn': { text: 'Double Size', on_click: getStartNewTaskHandler('img2img_X2') },
'imgRedoBtn': { text: 'Redo', on_click: getStartNewTaskHandler('img2img') },
'makeSimilarBtn': { text: 'Make Similar Images', on_click: onMakeSimilarClick },
}
if (!req.use_upscale) {
buttons.upscaleBtn = { text: 'Upscale', on_click: getStartNewTaskHandler('upscale') }
}
// include the plugins
Object.assign(buttons, PLUGINS['IMAGE_INFO_BUTTONS'])