From d66fa388044c51ed8b04f532c9f01c4d7d6804ab Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Wed, 1 May 2024 01:05:33 +0900 Subject: [PATCH] run_postprocessing: allow base64 image as input --- modules/postprocessing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/postprocessing.py b/modules/postprocessing.py index 8ec122b7c..263017b91 100644 --- a/modules/postprocessing.py +++ b/modules/postprocessing.py @@ -2,7 +2,7 @@ import os from PIL import Image -from modules import shared, images, devices, scripts, scripts_postprocessing, ui_common, infotext_utils +from modules import shared, images, devices, scripts, scripts_postprocessing, ui_common, infotext_utils, util from modules.shared import opts @@ -31,6 +31,8 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir, for filename in image_list: yield filename, filename else: + if isinstance(image, str): + image = util.decode_base64_to_image(image) assert image, 'image not selected' yield image, None