DALLE-pytorch
DALLE-pytorch copied to clipboard
Cant run example models in colab due to lightning error
Hi, I've tried a few of the notebooks you provided for the examples but I run in to the same error across all of them in colab with the following error:
ImportError Traceback (most recent call last)
[<ipython-input-6-548ac97a7512>](https://localhost:8080/#) in <module>
15 # dalle classes
16
---> 17 from dalle_pytorch import DiscreteVAE
18
19 # constants
4 frames
[/usr/local/lib/python3.7/dist-packages/taming/main.py](https://localhost:8080/#) in <module>
10 from pytorch_lightning.trainer import Trainer
11 from pytorch_lightning.callbacks import ModelCheckpoint, Callback, LearningRateMonitor
---> 12 from pytorch_lightning.utilities.distributed import rank_zero_only
13
14 def get_obj_from_str(string, reload=False):
ImportError: cannot import name 'rank_zero_only' from 'pytorch_lightning.utilities.distributed' (/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/distributed.py)
I think the version of lightning that is installed by the script might be incorrect now?
Any help getting this fixed is greatly appreciated!
Thanks
Any solution?
Any solution to this?
any solution to this? facing the same in conda 3.9.7 and python3 (3.11.5) as well.
I got this to work by manually installing pytorch-lightning==1.9.0
instead of >2.0.0 (rank_zero_only is deprecated).