Open PhreakHeaven opened 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.
@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:
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.
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'
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.
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.