Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#7650 from vladmandic/img2img-fix
Browse files Browse the repository at this point in the history
Convert image from RGBA to RGB before saving
  • Loading branch information
AUTOMATIC1111 authored Feb 19, 2023
2 parents fe46a08 + 4c562a9 commit e287d9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):

if not save_normally:
os.makedirs(output_dir, exist_ok=True)
if processed_image.mode == 'RGBA':
processed_image = processed_image.convert("RGB")
processed_image.save(os.path.join(output_dir, filename))


Expand Down

0 comments on commit e287d9b

Please sign in to comment.