diff --git a/ui/easydiffusion/renderer.py b/ui/easydiffusion/renderer.py index 8cceb81b..c5dc88b4 100644 --- a/ui/easydiffusion/renderer.py +++ b/ui/easydiffusion/renderer.py @@ -146,6 +146,9 @@ def make_step_callback( def update_temp_img(x_samples, task_temp_images: list): partial_images = [] images = latent_samples_to_images(context, x_samples) + if task_data.block_nsfw: + images = apply_filters(context, "nsfw_checker", images) + for i, img in enumerate(images): buf = img_to_buffer(img, output_format="JPEG") diff --git a/ui/index.html b/ui/index.html index 5d7757b4..7112c022 100644 --- a/ui/index.html +++ b/ui/index.html @@ -501,8 +501,8 @@ async function init() { SD.init({ events: { - statusChange: setServerStatus - , idle: onIdle + statusChange: setServerStatus, + idle: onIdle } }) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 53c3746b..55c42af6 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -302,7 +302,7 @@ function showImages(reqBody, res, outputContainer, livePreview) { } if(allHidden === true) { const req = htmlTaskMap.get(parentTaskContainer) - if(!req.isProcessing || req.batchesDone == req.batchCount) {parentTaskContainer.classList.add("displayNone")} + if(!req.isProcessing || req.batchesDone == req.batchCount) {parentTaskContainer.parentNode.removeChild(parentTaskContainer)} } }) }) @@ -327,9 +327,6 @@ function showImages(reqBody, res, outputContainer, livePreview) { imageExpandBtn.addEventListener('click', function() { imageModal(imageElem.src) }) - imageElem.addEventListener('click', function() { - imageModal(this.src) - }) const req = Object.assign({}, reqBody, { seed: result?.seed || reqBody.seed