Required changes to make diffusers work out of the book with CoreML: https://gist.github.com/madebyollin/86b9596ffa4ab0fa7674a16ca2aeab3d?permalink_comment_id=4295017