stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

Option to not store images in individual folders

Open Michoko92 opened this issue 3 years ago • 2 comments

Hi,

As the title says, I'd like to be able to generate all images into the same folder. When we play with prompts, especially if the changes happen at the end of the prompt, it can be quite difficult to find which one is new or not. Personally, having all images generated into one single folder would be much easier and straightforward to manage.

Do you know if there is such a option already? And if not, would you like to add it, please?

Thank you! :)

Michoko92 avatar Aug 28 '22 14:08 Michoko92

Although you can specify the parent directory, it's currently set to save to individual folders per prompt. Luckily, all you have to do to save to one folder is to adjust line 250 from: sample_path = os.path.join(outpath, "_".join(re.split(":| ", prompts[0])))[:150] to: sample_path = outpath

If you want to then separate images by prompt in that giant folder, you can make this adjustment to line 306 from: os.path.join(sample_path, "seed_" + str(opt.seed) + "_" + f"{base_count:05}.{opt.format}") to os.path.join(sample_path, "seed_" + str(opt.seed) + "_" + f"{base_count:05}{opt.prompt:150}.{opt.format}")

GucciFlipFlops1917 avatar Aug 28 '22 15:08 GucciFlipFlops1917

Thank you, much appreciated! :)

Michoko92 avatar Aug 28 '22 15:08 Michoko92