Automatic1111's WebUI natively supports saving images with prompts in metadata as JPG and WEBP. Especially the WEBP format is great for saving a lot of space compared to PNG, with minimal quality loss. WEBP files are also much faster to read and write than PNG.
I wrote a short script for indexing and searching prompts, where I used a function copied from Auto's code (run_pnginfo) to extract prompts from PNG and JPG, but it didn't work for WEBP for me, so I wrote my own line of code to extract prompts from these. I linked to the relevant part of code:
I couldn't figure out why only a few thousand of my tens of thousands of images showed up until I realized it was only showing me the PNG files. Please support Automatic1111 JPG files.
Automatic1111's WebUI natively supports saving images with prompts in metadata as JPG and WEBP. Especially the WEBP format is great for saving a lot of space compared to PNG, with minimal quality loss. WEBP files are also much faster to read and write than PNG.
I wrote a short script for indexing and searching prompts, where I used a function copied from Auto's code (
run_pnginfo
) to extract prompts from PNG and JPG, but it didn't work for WEBP for me, so I wrote my own line of code to extract prompts from these. I linked to the relevant part of code:https://gist.github.com/r7vz9h3/008e86bed8a4cbe4079e644ac71ccfc3#file-findgens-py-L72
All I needed was:
I'm sure this can be improved a lot, but it seems to work.