Add save_intermediate_images script#5464
Conversation
Combines a few different scripts in various GitHub issues with some useful added features: - This script is set to `scripts.AlwaysVisible`, meaning it can be run in combination with other scripts - Intermediate images are saved using the same filename structure as the final images, in a subdirectory called "intermediates". The custom script in the wiki overwrites your intermediate images each time you generate new images - Allows you to save every N images (defaults to 5) - Allows you to save either denoised or noisy intermediate images See AUTOMATIC1111#1026 See AUTOMATIC1111#2137 See AUTOMATIC1111#2094 See AUTOMATIC1111#2739 See AUTOMATIC1111#4709
a4dc4bb to
db31726
Compare
|
very nice but this will have to become an extension |
|
This is a very useful functionality! I'm not sure if this is currently being converted to an extension, but if so I think there is a small bug in the current code. This:
gives me filenames like 15-0000-4092713123.0-[prompt_spaces].png I believe this would solve the issue:
|
|
I put Kevin's work into an extension and made a few changes:
Any thoughts? |
|
usefully.
how about intermediate subfolder names correspond to index number of currently generated image instead of a sequence from zero? like xxxxx.image-filename-pattern-from-settings. => xxxxxx folder. or more odd way "last generated index number"+1 if there's no way to accure current number.
large prompts cropped and mostly useless, especially for large path. how about determine name from settings instead? |
|
Good suggestions, thanks. Turns out DDIM and PLMS use VanillaStableDiffusionSampler, while the others use KDiffusionSampler. It looks like VanillaStableDiffusionSampler doesn't have callback-capabilities, so I'm not sure it's possible. I'll look into them. Update: |
|
it is now an extension: https://github.com/AlUlkesh/sd_save_intermediate_images |
|
Plz add API support to this extension |
Combines a few different scripts in various GitHub issues with some useful added features:
scripts.AlwaysVisible, meaning it can be run in combination with other scriptsSee #1026
See #2137
See #2094
See #2739
See #4709