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

[Feature Request]: persist script state across restarts

Open SIGSTACKFAULT opened this issue 3 years ago • 1 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 ?

I seem to be a bit short on RAM so my launch.py gets OOM killed pretty frequently, especially when using scripts and batch mode for some reason. after restarting the process and reloading the webpage, the configuration of scripts is lost.

so: store the script state in params.txt, or maybe a second file e.g., script-params.txt.

Proposed workflow

  1. server gets OOM killed and dies,
    • or you ^C the process yourself, walk away from your pc, and come back the next day
  2. manually restart server
  3. refresh webpage
  4. press the ↙️ button
  5. everything is back the way you set it, including the selected script and the options for the script.

Additional information

could also store the script state in a cookie or localstorage or something like that

SIGSTACKFAULT avatar Nov 06 '22 20:11 SIGSTACKFAULT

This also happens to me so I'd like to second the request, with expansion. File under "nice to have someday".

All the parameters on the screen (model, scripts, etc.) should be saved, not just the scripts. "Send to txt2img" (etc) should carry all such setting into the target tab. Perhaps with an option to not switch models. There should be a button to copy the UI state to the clipboard (maybe as json), these could be shared on sites like civitai. There should be an option to save the state json as EXIF data in the PNG files. The PNG info tab would show this and allow it to be sent to other tabs. Prompt, script settings, model, networks, and all. There would also be a button to set the state from clipboard (or drop or upload in a state file, or paste it into a box first)

I have not look at the script API, but it should support discovering and setting parameters as a first class function. I understand scripts may need to be enhanced to support this. If it does not exist already.

I hope this makes sense to everyone. :)

axemaster avatar Feb 19 '23 02:02 axemaster