Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Energy-Based Cross Attention for Bayesian Context Update in Text-to-Image Diffusion Models

About

Despite the remarkable performance of text-to-image diffusion models in image generation tasks, recent studies have raised the issue that generated images sometimes cannot capture the intended semantic contents of the text prompts, which phenomenon is often called semantic misalignment. To address this, here we present a novel energy-based model (EBM) framework for adaptive context control by modeling the posterior of context vectors. Specifically, we first formulate EBMs of latent image representations and text embeddings in each cross-attention layer of the denoising autoencoder. Then, we obtain the gradient of the log posterior of context vectors, which can be updated and transferred to the subsequent cross-attention layer, thereby implicitly minimizing a nested hierarchy of energy functions. Our latent EBMs further allow zero-shot compositional generation as a linear combination of cross-attention outputs from different contexts. Using extensive experiments, we demonstrate that the proposed method is highly effective in handling various image generation tasks, including multi-concept generation, text-guided image inpainting, and real and synthetic image editing. Code: https://github.com/EnergyAttention/Energy-Based-CrossAttention.

Geon Yeong Park, Jeongsol Kim, Beomsu Kim, Sang Wan Lee, Jong Chul Ye• 2023

Related benchmarks

TaskDatasetResultRank
Text-to-Image SynthesisAnE Object-Object
Full Similarity0.321
10
Text-to-Image SynthesisAnE Animal-Object split
Full Similarity0.317
10
Text-to-Image SynthesisAnE Animal-Animal
Full Similarity29.1
10
Image-to-Image TranslationLAION Cat → Dog 5B (test)
CLIP Accuracy93.7
5
Image-to-Image TranslationLAION Cat → Cat w/ glasses 5B (test)
CLIP Accuracy81.1
5
Image-to-Image TranslationLAION Horse → Zebra 5B (test)
CLIP Accuracy90.4
5
Showing 6 of 6 rows

Other info

Code

Follow for update