mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Re-add import but after if check
This commit is contained in:
parent
4e6e2574ab
commit
32ba757501
@ -27,6 +27,7 @@ def fix_torch_version():
|
|||||||
def fix_pytorch_lightning():
|
def fix_pytorch_lightning():
|
||||||
# Checks if pytorch_lightning.utilities.distributed already exists in the sys.modules cache
|
# Checks if pytorch_lightning.utilities.distributed already exists in the sys.modules cache
|
||||||
if 'pytorch_lightning.utilities.distributed' not in sys.modules:
|
if 'pytorch_lightning.utilities.distributed' not in sys.modules:
|
||||||
|
import pytorch_lightning
|
||||||
# Lets the user know that the library was not found and then will set it to pytorch_lightning.utilities.rank_zero
|
# Lets the user know that the library was not found and then will set it to pytorch_lightning.utilities.rank_zero
|
||||||
print(f"Pytorch_lightning.distributed not found, attempting pytorch_lightning.rank_zero")
|
print(f"Pytorch_lightning.distributed not found, attempting pytorch_lightning.rank_zero")
|
||||||
sys.modules["pytorch_lightning.utilities.distributed"] = pytorch_lightning.utilities.rank_zero
|
sys.modules["pytorch_lightning.utilities.distributed"] = pytorch_lightning.utilities.rank_zero
|
||||||
|
Loading…
Reference in New Issue
Block a user