AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.83k stars 26.64k forks source link

Star/heart/thumbs-up results for easier comparison #2095

Open PhreakHeaven opened 1 year ago

PhreakHeaven commented 1 year ago

Is your feature request related to a problem? Please describe.

Lack of functionality. Would like the ability to star/heart/thumbs-up results and then compare only those results, rather than scrolling through all generations over and over to determine the best images.

Additionally, it would be really useful if each filename (as well as dimensions, like after outpainting and sending to img2img, in order to set the correct size...or automatically detect input image size and set it automatically also) would be displayed with the images so that while scrolling through, it would be easier to locate on disk.

Describe the solution you'd like

See above...don't know how to elaborate further!

Describe alternatives you've considered

Can't think of anything else.

JustMaier commented 1 year ago

I agree, this would be really helpful, I'm just not sure how it might work given that Gradio as a front-end seems very production centric and doesn't really seem to support curation of results. Additionally, I'm pretty sure this would require some sort of database or file system scanning to find images that have been marked accordingly.

Potential work-around Something that I do when I'm working on a generation project is actually just hit the Save button on any of the images that I like, that way I can go back and review them later.

Ideal solution I think the ideal solution is actually a different piece of software. My dream is to have an app that is focused on curating. I'd like to be able to specify directories that I want it to watch and then have it automatically pick up my generations read the generation parameters from the files and then allow me to search and filter based on the data in there. Once all of the images are in that tool, I would be able to tag them, rate them, whatever.

PhreakHeaven commented 1 year ago

@JustMaier

For my usage, I'm currently passing my nieces' art through and prefer maybe 4 out of 12 of the images, but not having the option to "mark" the good ones on the first scroll-through, and then be able to quickly flip through them to refine my selections just takes a while.

I look at the gallery and think "ok, 3.........6...........7............11; those were the good ones."

Next I'll:

  1. pull up the directory
  2. sort by date
  3. start to compare the ones I like in the browser with the saved files
  4. forget the numbers
  5. click through again and try to locate the ones I liked
  6. <alt+tab> back and forth
  7. forget if that image was one of them and
  8. go through again
  9. try to determine where they are in the directory some more
  10. copy them to another directory to keep them straight
  11. etc.

It's a whole mess. Maybe others have tips for a better workflow, but based on the current functionality, I haven't found another, preferable way.

It's just easier to compare files when they can be easily flipped through, so this is mostly a way to refine the selection process and would eliminate that whole list I just made :-P

So, actually, if this idea is implemented, it would be even better if there was an option to move the starred images and their attached files ('before-face-restoration.png' and the parameter text files) to a subdirectory within the generation directory.

Symbiomatrix commented 1 year ago

I dunno about the interface side, but customising the output filenames' format should be easy to achieve and fairly self contained, to my understanding: Gradio seems to store all the web side results in a temp directory, whereas the long term files are copy archived in modules/processing.py (actual format in images.save_image), at least for the automatic save feature:

                if p.restore_faces:
                    if opts.save and not p.do_not_save_samples and opts.save_images_before_face_restoration:
                        images.save_image(Image.fromarray(x_sample), p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p, suffix="-before-face-restoration")
#[...]
                if opts.samples_save and not p.do_not_save_samples:
                    images.save_image(image, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p)
def save_image(image, path, basename, seed=None, prompt=None, extension='png', info=None, short_filename=False, no_prompt=False, grid=False, pnginfo_section_name='parameters', p=None, existing_info=None, forced_filename=None, suffix="", save_to_dirs=None):
    '''Save an image.

    Args:[...]

Adding something like an "output filename format" with {parameter} placeholders in the settings tab seems like the most sensible way for that. But to make it truly generic, would have to actually save all the metadata per generated image / batch, not sure whether that happens currently.

Edit: There's something like that in images.apply_filename_pattern, though implemented with a bunch of "x = x.replace". An unpacked **dictionary in the format() function would be more succinct & robust, I think.

>> dd = {"a":1,"b":2,"c":3}
>> "{b}l{a}bl{a}".format(**dd)
'2l1bl1'
R4rum commented 1 year ago

I'm going to leave this here rather than its own feature request, but being able to easily compare an image to the original in the case of inpainting and img2img would be very helpful, too, I'd say.