mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-19 21:00:14 +08:00
FIX: initial_pp RGBA right way
This commit is contained in:
parent
61f488302f
commit
702edb288e
@ -99,7 +99,7 @@ def decode_base64_to_image(encoding):
|
||||
raise HTTPException(status_code=500, detail="Invalid encoded image") from e
|
||||
|
||||
|
||||
def encode_pil_to_base64(image):
|
||||
def encode_pil_to_base64(image: Image.Image):
|
||||
with io.BytesIO() as output_bytes:
|
||||
if isinstance(image, str):
|
||||
return image
|
||||
|
@ -66,7 +66,7 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
|
||||
if parameters:
|
||||
existing_pnginfo["parameters"] = parameters
|
||||
|
||||
initial_pp = scripts_postprocessing.PostprocessedImage(image_data)
|
||||
initial_pp = scripts_postprocessing.PostprocessedImage(image_data.convert("RGBA")) if image_data.mode == "RGBA" else scripts_postprocessing.PostprocessedImage(image_data.convert("RGB"))
|
||||
|
||||
scripts.scripts_postproc.run(initial_pp, args)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user