mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-03 20:22:56 +08:00
Ability for extensions to return custom data via api in response.images
This commit is contained in:
parent
e3c849da06
commit
f71e919ecb
@ -103,7 +103,8 @@ def decode_base64_to_image(encoding):
|
|||||||
|
|
||||||
def encode_pil_to_base64(image):
|
def encode_pil_to_base64(image):
|
||||||
with io.BytesIO() as output_bytes:
|
with io.BytesIO() as output_bytes:
|
||||||
|
if isinstance(image, str):
|
||||||
|
return image
|
||||||
if opts.samples_format.lower() == 'png':
|
if opts.samples_format.lower() == 'png':
|
||||||
use_metadata = False
|
use_metadata = False
|
||||||
metadata = PngImagePlugin.PngInfo()
|
metadata = PngImagePlugin.PngInfo()
|
||||||
|
Loading…
Reference in New Issue
Block a user