Watch the video:
Timestamps:
0:00 - Intro/Explanation
0:20 - A11 Check if "Save all images" is enabled
0:47 - Filesize for many AI images (+ Upscaled images)
1:13 - Converting images (and issues from it)
1:44 - Why use PNG instead of JPEG/JPG
2:03 - Converting to WEBP
2:25 - PNG vs WEBP vs JPG (Insane!)
2:50 - Why converting AI images is BAD!
3:50 - Generate future images as WEBP (Automatic)
5:00 - Preparing Python
6:45 - Installing Google's cwebp
8:25 - Installing exiftool
9:25 - Converting existing images (and keeping data)
10:35 - Mass converting AI images (5x SMALLER FILES!)
12:24 - Just saving space for new images (Easy)
If you’ve generated lots of AI images, Stable Diffusion may have consumed a LOT of your drive without you noticing. With a simple tip, you can get 5x smaller image filesizes of the same quality! AND you can compress your existing AI image collection (keeping important generation data and info!)
cwebp tool download: https://developers.google.com/speed/webp/download
exiftool: https://exiftool.org/index.html
Auto AI image convert script (Works for PNG and JPG/JPEG!): https://github.com/TCNOco/TcNo-Random-Scripts/blob/master/Python/Images-ConvertToWebp.py
More info:
Info on cwebp command line: https://developers.google.com/speed/webp/docs/cwebp