Skip to content

Commit 19f5795

Browse files
Merge pull request #13463 from FluttyProger/patch-1
Ability for extensions to return custom data via api in response.images
2 parents 6fe16a9 + f71e919 commit 19f5795

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/api/api.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def decode_base64_to_image(encoding):
103103

104104
def encode_pil_to_base64(image):
105105
with io.BytesIO() as output_bytes:
106-
106+
if isinstance(image, str):
107+
return image
107108
if opts.samples_format.lower() == 'png':
108109
use_metadata = False
109110
metadata = PngImagePlugin.PngInfo()

0 commit comments

Comments
 (0)