Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor & deduplicate web UI boot code #10557

Merged
merged 10 commits into from
May 20, 2023

Conversation

akx
Copy link
Collaborator

@akx akx commented May 19, 2023

Describe what this pull request is trying to achieve.

This PR refactors the boot code in webui.py to remove duplication between the initial-boot code and the reload code.

The order in which things get initialized will be slightly changed, but things do seem to Work On My Machine.

It also

  • refactors bits and pieces of the boot process to smaller functions
  • fixes a typo bug regarding TLS configuration

Additional notes and description of your changes

Each commit should be pretty atomic in itself aside from the final Deduplicate one, which was implemented by way of comparing the initialize() function and the trailing part of the while 1 loop in webui() and harmonizing them statement by statement.

Environment this was tested in

  • OS: macOS
  • Browser: Chrome
  • Graphics card: M2 Max

Test notes:

  • generated an image
  • reloaded
  • generated another image

@akx akx force-pushed the dedupe-webui-boot branch from 701ab8e to 03fc539 Compare May 19, 2023 14:36
@akx akx force-pushed the dedupe-webui-boot branch from 03fc539 to 71f4a4a Compare May 19, 2023 14:38
@akx akx marked this pull request as ready for review May 20, 2023 08:06
@akx akx requested a review from AUTOMATIC1111 as a code owner May 20, 2023 08:06
@AUTOMATIC1111
Copy link
Owner

It's a very good effort, the duplicated code was a huge eyesore, I'll play around with it and merge it.

@AUTOMATIC1111 AUTOMATIC1111 merged commit cc6c0fc into AUTOMATIC1111:dev May 20, 2023
@akx akx deleted the dedupe-webui-boot branch May 30, 2023 15:04
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.

2 participants