Improving Diffusion-based Image Translation using Asymmetric Gradient Guidance

Gihyun Kwon, Jong Chul YearXiv 2023

Abstract

Diffusion models have shown significant progress in image translation tasks recently. However, due to their stochastic nature, there's often a trade-off between style transformation and content preservation. Current strategies aim to disentangle style and content, preserving the source image's structure while successfully transitioning from a source to a target domain under text or one-shot image conditions. Yet, these methods often require computationally intense fine-tuning of diffusion models or additional neural networks. To address these challenges, here we present an approach that guides the reverse process of diffusion sampling by applying asymmetric gradient guidance. This results in quicker and more stable image manipulation for both text-guided and image-guided image translation. Our model's adaptability allows it to be implemented with both image- and latent-diffusion models. Experiments show that our method outperforms various state-of-the-art models in image translation tasks.

Introduction

Diffusion models are currently the gold standard for high-fidelity image generation. However, applying them to Image-to-Image (I2I) translation—the task of converting a source image to a target domain while maintaining the original structure—remains a significant challenge. This difficulty stems from the "stochastic trade-off": granting the model high freedom for style transformation often results in the loss of the source image's structural integrity. Conversely, overly restrictive constraints can lead to underwhelming stylistic transitions.

Existing solutions typically involve either computationally expensive fine-tuning on specific domains or guidance-based sampling using external networks (like Vision Transformers) for structural loss. These approaches are often slow, resource-intensive, and prone to instability. To overcome these hurdles, we introduce Asymmetric Gradient Guidance (AGG), a sampling method that stabilizes and accelerates the translation process without requiring model fine-tuning.

Methodology: Asymmetric Gradient Guidance

AGG operates during the reverse sampling (denoising) process of a pre-trained diffusion model. The method is termed "asymmetric" because it employs a dual-stage update strategy to ensure the generated image remains on the natural image manifold while effectively moving toward the target style.

Hybrid Update Strategy

The process begins with a Manifold Constraint Gradient (MCG) step, which projects the noisy image toward a cleaner, more realistic version. This is followed by Decomposed Diffusion Sampling (DDS), which utilizes the Adam optimizer to efficiently refine the denoised signal. By framing the second update as an optimization problem rather than a standard backpropagation through the entire diffusion chain, AGG significantly reduces computational overhead.

The AGG framework enables complex style transitions, such as artistic rendering, while preserving the underlying structure of the source subject.

Efficient Structural Regularization

A key innovation of AGG is its approach to content preservation. Instead of relying on external feature-extraction networks, the method leverages intermediate products saved during the forward DDIM step (the initial process of adding noise to the source image). This provides a computationally "free" structural target that is highly effective at maintaining the geometry of the original image during translation.

Results and Evaluation

We evaluated AGG across several benchmarks, including Animal Faces, Landscapes, and Human Faces. The method demonstrates superior performance in both speed and quality compared to existing state-of-the-art models like DiffuseIT and Asyrp.

Speed and Quality

In text-guided translation tasks, AGG produces high-quality results in approximately 15 seconds per image on an NVIDIA RTX 3090, whereas competing methods like DiffuseIT can take 40 seconds or more. Quantitatively, AGG achieved the lowest scores in Simplified FID (SFID) and Class-wise SFID (CSFID), indicating that the generated images are both more realistic and better aligned with the target semantic category.

Attribute Editing

Beyond domain-to-domain translation, AGG is highly effective for fine-grained attribute editing. For instance, the model can successfully modify facial expressions or add specific features while perfectly preserving the identity of the subject.

Attribute editing results demonstrating the ability to add a smile to a lion while maintaining structural consistency.

Conclusion and Future Work

Asymmetric Gradient Guidance provides a robust, efficient framework for diffusion-based image translation. By leveraging manifold constraints and efficient optimization, it bypasses the need for costly fine-tuning. While the method is currently limited by the semantic gaps in pre-trained CLIP embeddings—which can hinder translations between highly dissimilar domains—future work focusing on improved text embedding models and semantic segmentation-based generation holds promise for further expanding the capabilities of AGG. As with all powerful image manipulation tools, the potential for creating deepfakes necessitates the parallel development of robust detection and regulatory measures.

Summary updated

BibTeX
@misc{kwon2023improving,
  author = {Gihyun Kwon and Jong Chul Ye},
  title = {{Improving Diffusion-based Image Translation using Asymmetric Gradient Guidance}},
  year = {2023},
  eprint = {2306.04396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.04396},
}
Figure