SenshiSentou / sd-webui-state-manager

A state manager to quickly save and return to previous configs in A1111
MIT License
55 stars 6 forks source link

[Feature Request] Auto-populate Option #10

Open VL4DST3R opened 5 months ago

VL4DST3R commented 5 months ago

Would it be possible to add an option for the last saved entry in the history to be applied to the ui when the page first loads? A checkbox similar to "Auto-save" would be very welcomed if you are like me and close/open tabs often.

SenshiSentou commented 5 months ago

Yes! This is actually a feature I really want to add, I just want to think about the UI a bit; it might be useful to set a dedicated entry rather than the last one for example. There's also a bug where loading the history from a file takes forever on reload, so that delay would be insanely annoying if the UI suddenly "jumps" after 20 seconds e.g. So it's on the roadmap!

VL4DST3R commented 5 months ago

The only (AFAIK) other addon which achieved this (and is now outdated) was https://github.com/ilian6806/stable-diffusion-webui-state and it seems to restore what still works very fast. Maybe you could also do whatever it does when it comes to populating fast?

SenshiSentou commented 5 months ago

Yup, that's the one I'm using too for now.

The speed problem doesn't lie in populating the UI, it's in loading the saved states from a file (save location option in settings). In vanilla Python this gets done in milliseconds on my machine with a ±25MB file, but when that same exact code runs as an endpoint in A1111 it takes ±20 seconds. That's why it takes so long for the buttons to appear when first loading the webui

VL4DST3R commented 5 months ago

I see what you mean, but at least in my case I very rarely need to dig through the history of saved prompts, instead just want to continue from where I left off, hence my ticket focusing on that feature alone. Is there no way to just save a "dirty" last UI state and load just that first time you boot up to prevent the delay? And only after that prepare the rest of the states (as it is being done currently)

SenshiSentou commented 5 months ago

I could, but that's a bandaid, and would not be consistent with the rest of the divide between saving to a browser's Indexed DB or to file. Like I said, I'd also like to let people set a specific state as their "default auto-load" state, so I'd really rather just fix this bug and do it proper

VL4DST3R commented 5 months ago

I suggested it since it sounded like it won't/can't be fixed for the time being due to issues outside your control. Moreso because the other extension is as I said more or less broken; the result atm is that there is no reliable way to have this functionality via either of the two extensions, which I felt was more important.

VL4DST3R commented 5 months ago

Actually scratch that, why not just ignore the speed issue entirely for now? I think one would rather wait a few seconds at boot than have to fiddle with menus to load a state, no?

SenshiSentou commented 5 months ago

Don't worry, I will get to it! Just no promises on when