Abstract
Existing attribute editing methods treat semantic attributes as binary, resulting in a single edit per attribute. However, attributes such as eyeglasses, smiles, or hairstyles exhibit a vast range of diversity. In this work, we formulate the task of diverse attribute editing by modeling the multidimensional nature of attribute edits. This enables users to generate multiple plausible edits per attribute. We capitalize on disentangled latent spaces of pretrained GANs and train a Denoising Diffusion Probabilistic Model (DDPM) to learn the latent distribution for diverse edits. Specifically, we train DDPM over a dataset of edit latent directions obtained by embedding image pairs with a single attribute change. This leads to latent subspaces that enable diverse attribute editing. Applying diffusion in the highly compressed latent space allows us to model rich distributions of edits within limited computational resources. Through extensive qualitative and quantitative experiments conducted across a range of datasets, we demonstrate the effectiveness of our approach for diverse attribute editing. We also showcase the results of our method applied for 3D editing of various face attributes.
Introduction
While StyleGAN and similar models have revolutionized image editing, they typically rely on finding a single "edit direction" in the latent space for a specific attribute. This approach assumes attributes are unidirectional: you either add "the" smile or you don't. In reality, semantic attributes are incredibly diverse. "Eyeglasses" can mean aviators, rimless frames, or thick-rimmed wayfarers; "hairstyles" can range from mohawks to bobs. Existing methods fail to capture this variety, often producing a "mean" version of an attribute.
This paper moves beyond binary edits toward diverse attribute editing, allowing for multiple, distinct, and realistic variations of the same semantic feature while preserving the subject's identity. By recognizing that an attribute is not a single point but a manifold, the authors propose modeling these complex distributions using diffusion models.
Methodology
The proposed three-stage pipeline combines the generative power of StyleGAN with the distribution-modeling capabilities of Denoising Diffusion Probabilistic Models (DDPMs).
- Data Generation: To learn what a "diverse edit" looks like, the authors first create a dataset of edit directions ($d_a$). They take pairs of images—one with the attribute and one without—and encode them into StyleGAN’s $W+$ latent space. The difference between these two latent vectors represents the "edit direction."
- Diffusion in Latent Space: Instead of diffusing pixels, they train a DDPM to learn the distribution of these edit vectors. Because the latent space is highly compressed compared to image space, the "denoiser" in their diffusion model is a simple, computationally inexpensive Multi-Layer Perceptron (MLP).
- Inference (Editing): To edit a new image, the user encodes it into a latent code ($w_s$). They then sample a new edit direction ($d_0$) from the trained DDPM. This sampled direction is scaled and shifted using hyperparameters—$\gamma$ for diversity and $\lambda$ for strength—and added to the original code.
Key Results and Insights
The researchers evaluated their method across several diverse domains, including CelebA-HQ, Metfaces (for out-of-domain art), LSUN (cars and churches), and EG3D (3D-aware consistency).
- Quantitative Superiority: In comparisons against baselines, the proposed method achieved better FID scores and higher Cosine Similarity (identity preservation). For the "Hairstyle" attribute, the method achieved an FID of 39.58, significantly lower than the baseline's 41.50.
- Diversity and Disentanglement: The method generates a wider variety of plausible outputs (higher "Recall") without "bleeding" into other attributes. For example, changing the style of glasses doesn't accidentally change the person's hair color or gender.
- Efficiency: By performing diffusion in the $W+$ latent space rather than pixel space, the authors achieve high-quality results with a fraction of the computational cost. The MLP denoiser is much faster to train and run than standard U-Net architectures.
Conclusion
By applying diffusion models to the latent space of GANs, this work enables diverse, high-quality attribute editing that captures the natural variety of semantic features. While the current training process relies on synthetic image pairs, future work aims to incorporate text-driven control to allow users to specify particular variations (e.g., "red circular glasses") within the learned distribution.
Summary updated