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

[Bug]: Large extra networks UI causes hundreds of megabytes of network transfer #8781

Closed
1 task done
space-nuko opened this issue Mar 21, 2023 · 3 comments
Closed
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@space-nuko
Copy link
Contributor

space-nuko commented Mar 21, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

With #8742 the issue of startup speed being tanked by building the extra networks UI is solved, however it still has to be sent over the network. Having several thousand LoRA files, I intercepted the data transferred and it was over 148MB minified (15MB compressed), nearly all of which was concentrated in the two extra networks pages

That amounts to 15 seconds it takes for the backend to GZip all that data and 25 seconds until First Contentful Paint, quite punishing if you need to reload the webui for anything

So there has to be a relatively sane way to keep all that data on the backend and inject it into the page only when it's necessary, especially since I don't even use the extra networks UI

And no I don't think this is a problem with my LoRA collecting habits, if there's potential performance improvements to be had by figuring out how not to transfer all that data at once then everyone who uses webui can benefit, also this is causing outright crashes like #8418 so it's a rather critical issue

Steps to reproduce the problem

  1. Load a lot of extra networks (hypernetworks, embeddings, LoRAs)
  2. Load/refresh the webui and time how long it takes

What should have happened?

Reloading the page shouldn't take 40 seconds

Commit where the problem happens

a9fed7c

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox, Google Chrome

Command Line Arguments

--opt-sdp-attention --disable-nan-check --listen --enable-insecure-extension-access --gradio-inpaint-tool color-sketch --allow-code --no-half-vae --lora-dir G:/model/lora

List of extensions

additional_networks

Console logs

N/A

Additional information

No response

@space-nuko space-nuko added the bug-report Report of a bug, yet to be confirmed label Mar 21, 2023
@missionfloyd
Copy link
Collaborator

missionfloyd commented Mar 21, 2023

How's this?
missionfloyd@1d096ed

Or this?
missionfloyd@b802e07
Sets background-image with javascript instead.

@evanjs
Copy link

evanjs commented Mar 25, 2023

Curious if/how this is affected by 9ed04e7 as mentioned in #8742 (comment).

@space-nuko
Copy link
Contributor Author

@evanjs #8742 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants