Skip to content

Commit

Permalink
Merge pull request #15893 from alcacode/dev
Browse files Browse the repository at this point in the history
Fix bug where file extension had an extra '.' under some circumstances
  • Loading branch information
AUTOMATIC1111 authored Jun 8, 2024
2 parents 0769aa3 + 6dd53ce commit 00f37ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
# WebP and JPG formats have maximum dimension limits of 16383 and 65535 respectively. switch to PNG which has a much higher limit
if (image.height > 65535 or image.width > 65535) and extension.lower() in ("jpg", "jpeg") or (image.height > 16383 or image.width > 16383) and extension.lower() == "webp":
print('Image dimensions too large; saving as PNG')
extension = ".png"
extension = "png"

if save_to_dirs is None:
save_to_dirs = (grid and opts.grid_save_to_dirs) or (not grid and opts.save_to_dirs and not no_prompt)
Expand Down

0 comments on commit 00f37ad

Please sign in to comment.