Imported from https://github.com/GaParmar/text_to_image