Transformer2D A Transformer model for image-like data from CompVis that is based on the Vision Transformer introduced by Dosovitskiy et al. The Transformer2DModel accepts discrete (classes of vector embeddings) or continuous (actual embeddings) inputs. When the input is continuous: Project the input and reshape it to (batch_size, sequence_length, feature_dimension). Apply the Transformer blocks in the standard way. Reshape to image. When the in