    return examples Finally, in the training loop, it starts by encoding the edited images into latent space:   Copied latents = vae.encode(batch["edited_pixel_values"].to(weight_dtype)).latent_dist.sample()