diffusion_models.models.conditioned_simple_unet =============================================== .. py:module:: diffusion_models.models.conditioned_simple_unet Module Contents --------------- .. py:class:: ConditionedSimpleUnet(diffuser, image_channels, text_embedding_size) A Simplified variant of the Unet architecture used in DDPM. :param diffuser: A gaussian diffuser. :param image_channels: The number of image channels. .. py:attribute:: text_embedding_mlp .. py:attribute:: time_mlp .. py:attribute:: conv0 .. py:attribute:: downs .. py:attribute:: ups .. py:attribute:: output .. py:method:: forward(x, timestep, labels = None) Forward pass of the diffusion model. The forward pass of the diffusion model, predicting the noise at a single step. :param x: A batch of noisy images. :param timestep: The timesteps of each image in the batch. :param labels: Optional labels to be passed when conditioning the diffusion model. :returns: A tensor representing the noise predicted for each image.