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

[Feature Request]: Settings Scheduling and Change on the Fly (Hot-Swap settings)

Open Ainaemaet opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Being able to change a number of various settings automatically (via scheduling) & 'on the fly' would be an amazing feature to have.

Currently the only way to do so that I know of is using those few (but very useful) features available in prompting (changing prompts using wildcards, automating prompt alterations using prompt matrix, etc).

Having a way to auto-stop at a certain batch count number in a batch of generations and auto-change almost any setting between x number of generations would be a godsend. Such a feature could be implemented by selecting a batch count number that you wanted to change settings on using the 'Batch count' slider, and then ctrl+clicking the 'batch count' box, which would change the batch count box to a text field allowing the user to type in the settings name they wish to change (similar to how we add settings to quick settings). Once you type the settings name in the newly exposed text field and hit enter, the settings slider for that field appears in the text fields place (alternatively it could appear at the top of the UI like the current 'quick settings' do, with an icon in the top corner of the particular quick setting [either pre-existing quick setting, or one newly added by this method alone] to signify it is for auto-setting change use - though having the Batch count field turn into a text field through ctrl+click would be much more elegant a solution), allowing the user to change the setting to whatever they wished; they could then ctrl+click the same box to turn it back into the 'batch count' field, change to a different batch count number, ctrl+click the box, type in a new setting and edit to change at that batch count number, and repeat the process scheduling various changes as desired.

Of course on the backend all that would really be necessary (other than implementing the graphical changes to enable the Batch count box to change to a text field [and then have the selected quick settings field appear there] - if that's possible with gradio, if not the 'quick settings at the top with icon' would need to be used) would be to stop the generations at a given Batch count number where a change has been scheduled, make the scheduled change (which would have been saved to a file, preferably human-readable so changes could be scheduled via text edit as well) and continue generating images from that Batch count number onwards, auto-stopping to switch scheduled settings wherever they've been scheduled, and continuing in such fashion until the end of the Batch count number has been reached.

Once such a system had been implemented users would have the ability to auto-schedule any number of desired changes, of any type of change, allowing them to set a scheduled batch to try out many different settings combinations automatically, which would make the UI an unbelievably powerful super-beast when it comes to testing and/or utilizing many different settings on a multiple-settings-per-batch basis.

While it sounds unwieldy it would be a rather smooth solution in practice, and once in-place such a system could also be easily enabled to allow such things like 'multiple random settings selections per batch' which, in both cases, would be extremely valuable. As well, as settings would be pulled from file during generation, it could be possible to have the UI check the file for changes every generation, allowing users to Hot-Swap exposed settings changes on-the-fly, which would also be quite useful when wanting to try different things without having to stop everything, swap to settings tab, make changes and continue.

Proposed workflow

  1. Go to 'Batch count'
  2. Select a Batch count number to schedule a setting(s) changes.
  3. CTRL+CLICK 'Batch count' box, changing Batch count box to a text field.
  4. Type in settings name and hit enter, changing text field to equivalent settings field (same as how 'quick settings' are implemented' only appearing in place of Batch count/text field.
  5. change setting
  6. CTRL+CLICK box again to change back to 'Batch Count'
  7. continue process, scheduling more changes as desired.
  8. Hit GENERATE and watch the magic happen as the UI switches through multiple scheduled settings automagically, making things even more amazing than before.
  9. Watch the people sing praises to the devs for giving them the most powerful feature darn-near imaginable.

Additional information

AUTOMATIC1111's SD-WEBUI is currently, by many standards and by a fairly large margin, the best UI available for Stable Diffusion. Giving users the ability to schedule nearly any settings using the above method would not only make the UI an insanely powerful tool for testing out and/or utilizing many different settings combinations AUTOMATICally - but would also make any further case-by-case implementations of automatic settings alterations unnecessary.

I only really have some C++ experience and am fairly new to Python, but even to my limited knowledge such an implementation seems like it should be reasonably easy for somebody experienced with Gradio development. Needing only to halt the process at a given Batch count number wherever a scheduled change is made, make the change (of which scheduled changes would be stored to editable file), and continue off from that Batch count number forwards and repeating (as scheduled) until finished.

If you think the UI kicks ass now (it does), think of what such a feature could allow us to do. Imagine running a batch of dozens (or hundreds) of images, automatically changing settings via an easy-to-use scheduling system such as this, and the joy of sitting down to look through all these different changes to see what the different combinations of settings produced; and as the settings scheduling would all be saved to file, users could easily share their settings changes files keeping with the 'all-for-one-and-one-for-all' mentality that many SD and diffusion artist's and aficionado's alike enjoy amongst each-other.

I don't think I can think of a cooler feature tbh (except maybe having such an ability implemented on a step-based granularity level) and with such a beautiful feature added we will all surely live long and prosper as the best AI artists the Latent Space (and Earth) has to offer 🖖

Ainaemaet avatar Oct 29 '22 21:10 Ainaemaet