stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Add Iterate Button and Improve PFF UI
This is a more conservative attempt to clean up the Prompts From File UI and adds checkbox to allow the seed to be iterated per-line: functionality that's helpful when you don't want to generate against the same seed(s) for every line.
As it loads...
After loading or typing text:

Changes in more detail:
UI fixes: shrink the textbox to one line until there is a change. At that point it grows to the standard size (or two lines if there aren't at least two lines of text). I also changed the file control to automatically populate the textbox and then clear itself, so it's clear to the user whether we are pulling from the textbox or the file control.
That's the best cleanup I can do without either reworking the visibility code or adding custom javascript, and I wanted to limit this change to the custom script.
Testing: I've been running with these changes for a while. I also tested all the other scripts, including the gradient-aesthetics extension, just to make sure there aren't weird issues. I tested loading prompts from a file, pasting them in, dragging things to the textbox, etc. I also tested the iteration changes with all variants of single or multiple batches and batch sizes.
PS: At some point, I think it would be helpful to revisit the way we handle showing/hiding script controls. If we put each script's content into a wrapper column, we could show/hide that column, and we wouldn't run into the current problem: Gradio controls which aren't IOComponents (aka, layout controls like tabs and such) can't really be used, since returning them from ui causes problems, because they throw an exception when passed as an input, due to the lack of any preprocess implementation. I could code that change up, but only if it's something that you're interested in.
"Iterate seed every line" = YEAY!
I don't get why this is even necessary though - surely "seed == -1" should be interpreted as "iterate seed every line". Not "Pick a random seed and then stick with it on every line".
But regardless... YEAY!
I don't get why this is even necessary though - surely "seed == -1" should be interpreted as "iterate seed every line". Not "Pick a random seed and then stick with it on every line".
I think what you’re asking is if we could skip the checkbox, and interpret -1 as “we should a new random seed every line?”
The advantages of iterating, even with random, is it creates a reproducible list of images by only rolling for random once. And it matches the behavior of running with multiple batches or batch size > 1.
I would personally be fine with your way, but it would change existing behavior, which I don’t like to do in case someone is relying on the old behavior.
No, that's well argued on your part. I'm sold on the checkbox.
@AUTOMATIC1111: any issues with this change? I tried to keep it small—a number of us find the iterate useful for long runs of variations overnight. Thanks!