add vae
reformat maybe needed
It seems you have simply copied the code from https://github.com/CompVis/stable-diffusion and submitted a pull request. While it is acceptable to draw inspiration from other open-source projects, it is shameful that you did not acknowledge the source of the code in your pull request.
Furthermore, you have not provided any results demonstrating how the submitted code is adapted to the project, and it bears no relevance to the entire opensora project whatsoever. This is extremely unprofessional.
Thanks for your good and professional advice. I thought it was relevant to the "Add VAE model, which is borrowed from Stable Diffusion."
Using a ready made VAE from the diffusers library might be a better choice than reinventing the wheel
(and compatible with a lot more VAEs) See example here https://github.com/Vchitect/Latte/blob/9ededbe590a5439b6e7013d00fbe30e6c9b674b8/sample/sample.py#L69
Simple copying of code may not be conducive to code structure. I'll be doing something similar this weekend.