mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-29 09:42:54 +08:00
run_postprocessing: allow base64 image as input
This commit is contained in:
parent
d36b732f55
commit
d66fa38804
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user