lucidrains / DALLE2-pytorch

Implementation of DALL-E 2, OpenAI's updated text-to-image synthesis neural network, in Pytorch
MIT License
11.06k stars 1.08k forks source link

Loading DiffusionPriorTrainer from path as string no longer works #218

Closed cdusold closed 2 years ago

cdusold commented 2 years ago

https://github.com/lucidrains/DALLE2-pytorch/blob/62043acb2fe8e13b43fdf12a2d14a86a6b4766e3/dalle2_pytorch/trainer.py#L303 The path_or_state variable is checked in the if statement then immediately path is referenced before it's assigned. So, if you want to load the trainer, now you have to pass in the state_dict instead of just the path. This breaks backwards compatibility and documented functionality as of commit f9423d308b6f36e51152c2c45045ff4ebb308287

lucidrains commented 2 years ago

@cdusold hey Chris! let us know if https://github.com/lucidrains/DALLE2-pytorch/commit/9646dfc0e6b24453d5fbe2baedbac709cc56699e fixes it!