-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
thread safe extra network list_items #13014
Conversation
when I was working on this I did consider also locking the worst that can happen if you prefer we also lock |
My preference is no locks. |
nope it was stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py Lines 16 to 18 in 5ef669d
caused by stable-diffusion-webui/modules/sd_models.py Lines 141 to 143 in 5ef669d
I used so in the rare event that this actually happeneds if you're in a multi-user scenario there is a higher chance of breaking and it won't automatically fix because the second refresh is from a different user so the current user won't receive the good update |
af4a03b
to
e785402
Compare
oops |
I have a suspicion that the issue caused by I suspect one would have to be extremely unlucky for this to happen it can also be an issue triggered by debugger |
Description
should prevent this from happening #13011 #13896
I was able to reproduce the issue using strategically placed breakpoints manually steping
since refreshing of extra networks can be called concurrently
the dictionary might be modified during looping list_items
we should use locking to protect it against accidental unexpected changes
even though the error described in the issue post is only for lora
as other extra networks tab share the same logic I applyed the same treatment to all of them
Checklist: