Browse Source

Merge pull request #13463 from FluttyProger/patch-1

Ability for extensions to return custom data via api in response.images
AUTOMATIC1111 1 year ago
parent
commit
19f5795c27
1 changed files with 2 additions and 1 deletions
  1. 2 1
      modules/api/api.py

+ 2 - 1
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()