mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
add images.read to automatically fix all jpeg/png weirdness
This commit is contained in:
@@ -17,10 +17,10 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
|
||||
if extras_mode == 1:
|
||||
for img in image_folder:
|
||||
if isinstance(img, Image.Image):
|
||||
image = img
|
||||
image = images.fix_image(img)
|
||||
fn = ''
|
||||
else:
|
||||
image = Image.open(os.path.abspath(img.name))
|
||||
image = images.read(os.path.abspath(img.name))
|
||||
fn = os.path.splitext(img.orig_name)[0]
|
||||
yield image, fn
|
||||
elif extras_mode == 2:
|
||||
@@ -56,7 +56,7 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
|
||||
|
||||
if isinstance(image_placeholder, str):
|
||||
try:
|
||||
image_data = Image.open(image_placeholder)
|
||||
image_data = images.read(image_placeholder)
|
||||
except Exception:
|
||||
continue
|
||||
else:
|
||||
|
Reference in New Issue
Block a user