From f71e919ecb001c4d191b76a87477d6118de7be12 Mon Sep 17 00:00:00 2001 From: FluttyProger Date: Sun, 1 Oct 2023 18:06:48 +0300 Subject: [PATCH] Ability for extensions to return custom data via api in response.images --- modules/api/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/api/api.py b/modules/api/api.py index 905ef9c95..efedafa42 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -103,7 +103,8 @@ def decode_base64_to_image(encoding): def encode_pil_to_base64(image): with io.BytesIO() as output_bytes: - + if isinstance(image, str): + return image if opts.samples_format.lower() == 'png': use_metadata = False metadata = PngImagePlugin.PngInfo()