Skip to content

restore the progress from session lost / tab reload#7595

Merged
AUTOMATIC1111 merged 9 commits into
AUTOMATIC1111:devfrom
siutin:feature/restore-progress
Apr 29, 2023
Merged

restore the progress from session lost / tab reload#7595
AUTOMATIC1111 merged 9 commits into
AUTOMATIC1111:devfrom
siutin:feature/restore-progress

Conversation

@siutin

@siutin siutin commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

Describe what this pull request is trying to achieve.

This PR attempts to restore the progress bar from session lost / tab reload

Environment this was tested in

  • OS: Ubuntu 22.04
  • Browser: Firefox 109.0.1 (64bit)

Screenshots or videos of your changes

stable-diffusion-webui-restore-progress.mp4

@siutin siutin requested a review from AUTOMATIC1111 as a code owner February 6, 2023 11:55
@siutin siutin changed the title restore the progress bar from session lost / tab reload restore the progress from session lost / tab reload Feb 6, 2023
@hithereai

Copy link
Copy Markdown
Collaborator

@siutin could you please resolve the conflicts so auto will be, in theory, able to review it?

@AUTOMATIC1111

Copy link
Copy Markdown
Owner

my problems with it:

  1. this allows you to "restore" other users' generations.
  2. considering (1), preventing img2img showing up in text2img seems not to be really necessary, and I don't want to add stuff to task ids just for that
  3. it's a fairly uncommon thing to do for user and it takes half the space away from the most useful button in the whole program

@siutin

siutin commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author
  1. That would require multiple user support. I'm not quite familiar with it, but I could have a look.
  2. This PR can restore progress for both txt2img and img2img.
    Therefore I'm not quite sure I understand this, maybe I'm missing something here?
  3. I can try making the button smaller or explore other options. Do you have any preferences on this?

my problems with it:

  1. this allows you to "restore" other users' generations.
  2. considering (1), preventing img2img showing up in text2img seems not to be really necessary, and I don't want to add stuff to task ids just for that
  3. it's a fairly uncommon thing to do for user and it takes half the space away from the most useful button in the whole program

@AUTOMATIC1111

Copy link
Copy Markdown
Owner

1 - how about saving task id locally in the browser (js localstorage) and using that to restore the session

2 - I'd like to not add any changes to task ids for simplicity and if the side effect of that is that you can load img2img results in text2img tab, that's not a problem

3 - well, how about a button below generate along with other buttons in that row.

As an extra together with (1) the button can be made only visible if the task id is stored locally and not visible otherwise, and local task id would be emptied after a generation finishes so the button would normally be hidden. this is getting fairly complex considering user can have multiple tabs open so maybe this extra can be dumped...

@siutin

siutin commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author
  1. It seems like back-end support would be a more appropriate way on this ...
  2. Okay
  3. No problem

@siutin siutin force-pushed the feature/restore-progress branch from e1c91db to 88624b2 Compare March 28, 2023 19:53
@siutin siutin force-pushed the feature/restore-progress branch from 88624b2 to 70ab21e Compare March 30, 2023 09:20
@siutin siutin force-pushed the feature/restore-progress branch from 6d9639b to 3c8a4b7 Compare April 16, 2023 17:04
@siutin siutin force-pushed the feature/restore-progress branch 2 times, most recently from dfe3ef4 to e30aee6 Compare April 17, 2023 03:57
@siutin siutin force-pushed the feature/restore-progress branch from e30aee6 to 3e5b3c7 Compare April 17, 2023 05:53
@siutin

siutin commented Apr 24, 2023

Copy link
Copy Markdown
Contributor Author

I've made some changes based on the feedback I received. For (1), I updated the Task API to be user-specific when authentication is enabled. This means that users won't be able to restore someone else's work unless they have the exact task ID. I hope this addresses the concern.

newui

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev April 29, 2023 19:13
@AUTOMATIC1111 AUTOMATIC1111 merged commit 80987c3 into AUTOMATIC1111:dev Apr 29, 2023
AUTOMATIC1111 added a commit that referenced this pull request Apr 29, 2023
@AUTOMATIC1111

Copy link
Copy Markdown
Owner

I ended up doing an independent implementation that tracks task id in browser locally and uses that to restore, showing the button only if the task id exists for a task that wasn't finished properly in the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants