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

options to reload the last generated prompt at startup

Open space-nuko opened this issue 3 years ago • 8 comments

Bit of a hassle to hunt for the last prompt used and I do this all the time since the negative prompt basically stays the same each time

The implementation uses the most recently generated image in the txt2img output folder

space-nuko avatar Oct 15 '22 10:10 space-nuko

Thank you for your contribution. Please be aware that resources within this repository are not provided under an open source license. Code resources within this repository are not guaranteed to carry their respective original authors license terms. #2059 https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/CODEOWNERS

CODEOWNERS is a feature of GitHub to automate the review process rather than indicating something, I guess?

sgkoishi avatar Oct 15 '22 14:10 sgkoishi

Personality, I turned off the option to automatically save every image generated, but I'd like to have the feature for the UI to load the last options I used (prompts, steps, cfg scale, etc).

Might be cool to have a single button in the txt2img tab that loads all the configs from the last image you saved manually.

I'm just a user though, no guarantee automatic would even accept a PR that added that feature

HunterVacui avatar Oct 15 '22 20:10 HunterVacui

you can set the default prompt using ui-config.json

AUTOMATIC1111 avatar Oct 16 '22 07:10 AUTOMATIC1111

Yeah but this is more a "pick up where I left off" feature, for example if I need to restart the UI if something got stuck doe to network/other issues (esp. when using the UI on my phone with a cellular connection, it sucks to have to go restore the last prompt I had open every time since I know I'm always going to do it)

space-nuko avatar Oct 16 '22 07:10 space-nuko

From a user point of view, I can definitely see the advantages of restoring the state of the last session. I often wished to be able to start from where I left last time I used the UI (this is a common and very useful feature with web browsers, that I use all the time). Also, it would immediately keep us safe from an accidental F5 press.

The only drawback is that using the last generated image may not be robust enough, as people can delete generated images they are not interested in. Personally, that's always what I do : generate, then delete the images I'm not interested in, to keep things manageable.

What I'd love is to have a separate json file (like "session.json" for ex.) , that would contain the current state of the UI (and that would be updated every time a new generation is started). That would be so handy!

Michoko92 avatar Oct 16 '22 08:10 Michoko92

Would this feature not be better implemented by saving the options to something like the browser's local storage, this way it would also support multiple users/shared installations.

The ui-config.json is a great way to set defaults and expand the options, however saving the last used options (or an option to) is a great addition.

yiiTT avatar Oct 16 '22 18:10 yiiTT

if you push the read generation parameter from prompt button ↙️ when the prompt textbox is empty, it will reload the parameters of the last generation.

tsngo avatar Oct 18 '22 01:10 tsngo

Bug (?) I found with that is if you train a hypernetwork it overwrites that last prompt, I'd expect last txt2img prompt instead

Also imo that UI is not discoverable at all, if I have to ask if I can use it then maybe it should be documented somewhere plainly obvious in the UI

Maybe just saving the prompt/state somewhere would work best?

space-nuko avatar Oct 19 '22 18:10 space-nuko

Since we already can do that by pressing ↙️ and the amount of code is very large for something that already is here, I choose to not have this added.

AUTOMATIC1111 avatar Jan 04 '23 15:01 AUTOMATIC1111