-
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
Update outdated pytorch_lightning import to prevent boot crash #12391
Conversation
The existing imports results in this error: ModuleNotFoundError: No module named 'pytorch_lightning.utilities.distributed' This is documented in AUTOMATIC1111#11458 but no fix was made to the repo itself. I'm not sure it's a safe change but it never hurts to ask.
Going to close this for now since it doesn't resolve the underlying issue. Also crucially, I run into another crash which is much harder to decipher:
|
the repo uses pytorch_lightning 1.9.4 which does not have this error |
There are no version specifications for the UI in requirements.txt for pytorch-lightning, so it doesn't protect it from downloading verison 2.0.0 since Should it be? Edit: since not having run |
Something is wrong your side then of course packages are installed by requirements_version.txt, requirements.txt is only checking if package is already installed. So something else must have installed a different version. |
checking if package is already installed is |
Closing as unnecessary then. Sorry for the trouble. I think I need a better conda isolation for package most likely. |
pytorch-lightning==1.6.5 works for me |
Given this environment:
The imports prior to the changes in this PR results in this error:
Full stack trace:
This addresses #11458 which documents the bug but no fix was made to the repo itself (yet).
I'm not sure it's a safe change but it never hurts to ask. For instance I don't know if this is a backward-compatible change.
Importantly this does not resolve the issue fully
Even after this change, a crash occurs due to:
AFAIK that's a downloaded file, so perhaps the version of
stable-diffusion-stability-ai
needs to be updated? Not sure.It looks like the current (as of today culprit code in the stablediffusion repository still uses this outdated namespace as well.
Manually editing this code to also use
rank_only
in the import namespace manages to get the boot process to the next stage:It's likely this PR might need to wait for a while and a better temporary solution would be to pin down the pytorch-lightning dependency to an earlier version that still offers
distributed
in the import namespace. Since pytorch-lightning 2.0.0(which gets installed with the existing requirements.txt) is major version bump I'm guessing 1.9.x could be safe?