-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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]: WebUI client-side (JS) does not garbage collect memory until user refreshes the page #6677
Comments
Clear Canvas History doesn't seem to have an immediate effect on memory usage here. Upon further examination it appears the Web UI does occasionally garbage collect, in that my RAM usage does appear to go down from time to time. However after extended prolonged use (30-60 min, >100 1024x1024 generations) the overall usage still goes past my RAM capacity as per my original report. |
More specifically what I'm doing is:
Hopefully you can reproduce with these steps on Firefox ~128. |
The problem does not seem to exist - or exists to a much lesser degree - on Chromium 126, RAM usage is stable even after the above steps. Specifically in (2) is where Firefox RAM usage shoots up the fastest, on Chromium it hardly budges. |
Actually the problem does exist in Chromium, just perhaps a bit slower than Firefox. The main contributor is step (2), cycling through the images. If you cycle through the images, waiting 1-2 seconds between each arrow press, the RAM usage continues to go up, even when cycling past previously-loaded images. Clear Canvas History doesn't help, refreshing the page does help. |
The high-level, declarative API used by canvas is holding references when it should be releasing them, preventing the browser from GC'ing. That API doesn't let us manage references effectively - it's too abstract. Canvas is in the middle of a full rewrite using a lower-level, imperative API. I've put a lot of attention and care into efficiency in the rewrite and I don't see this issue there. Memory allocations are substantially reduced overall. I don't plan on investigating this specific issue since the affected implementation is on its way out. |
Invoke v5 features a full rewrite of the canvas. Please create a new GH issue if the problem still exists in the new canvas UI. |
Is there an existing issue for this problem?
Operating system
Linux
GPU vendor
AMD (ROCm)
GPU model
No response
GPU VRAM
No response
Version number
v4.2.6post1 + PR #6539
Browser
Firefox 128.0+linuxmint1+virginia
Python dependencies
Using Python 3.12 as per PR #6539 since Python 3.11 has been dropped from Debian Testing.
What happened
What you expected to happen
I should not have to manually refresh the page every few minutes to avoid the InvokeAI web UI hanging my computer.
How to reproduce the problem
See steps above.
Additional context
No response
Discord username
No response
The text was updated successfully, but these errors were encountered: