Training-Free Layout-to-Image Generation with Marginal Attention Constraints

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chen, Huancheng, Li, Jingtao, Zhuang, Weiming, Vikalo, Haris, Lyu, Lingjuan
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915881978691584
author Chen, Huancheng
Li, Jingtao
Zhuang, Weiming
Vikalo, Haris
Lyu, Lingjuan
author_facet Chen, Huancheng
Li, Jingtao
Zhuang, Weiming
Vikalo, Haris
Lyu, Lingjuan
contents Recently, many text-to-image diffusion models have excelled at generating high-resolution images from text but struggle with precise control over spatial composition and object counting. To address these challenges, prior works have developed layout-to-image (L2I) approaches that incorporate layout instructions into text-to-image models. However, existing L2I methods typically require fine-tuning of pre-trained parameters or training additional control modules for diffusion models. In this work, we propose a training-free L2I approach, MAC (Marginal Attention Constrained Generation), which eliminates the need for additional modules or fine-tuning. Specifically, we use text-visual cross-attention feature maps to quantify inconsistencies between the layout of the generated images and the provided instructions, and then compute loss functions to optimize latent features during the diffusion reverse process. To enhance spatial controllability and mitigate semantic failures under complex layout instructions, we leverage pixel-to-pixel correlations in self-attention feature maps to align cross-attention maps and combine three loss functions constrained by boundary attention to update latent features. Comprehensive experimental results on both L2I and non-L2I pretrained diffusion models demonstrate that our method outperforms existing training-free L2I techniques, both quantitatively and qualitatively, in terms of image composition on the DrawBench and HRS benchmarks.
format Preprint
id arxiv_https___arxiv_org_abs_2411_10495
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Training-Free Layout-to-Image Generation with Marginal Attention Constraints
Chen, Huancheng
Li, Jingtao
Zhuang, Weiming
Vikalo, Haris
Lyu, Lingjuan
Computer Vision and Pattern Recognition
Recently, many text-to-image diffusion models have excelled at generating high-resolution images from text but struggle with precise control over spatial composition and object counting. To address these challenges, prior works have developed layout-to-image (L2I) approaches that incorporate layout instructions into text-to-image models. However, existing L2I methods typically require fine-tuning of pre-trained parameters or training additional control modules for diffusion models. In this work, we propose a training-free L2I approach, MAC (Marginal Attention Constrained Generation), which eliminates the need for additional modules or fine-tuning. Specifically, we use text-visual cross-attention feature maps to quantify inconsistencies between the layout of the generated images and the provided instructions, and then compute loss functions to optimize latent features during the diffusion reverse process. To enhance spatial controllability and mitigate semantic failures under complex layout instructions, we leverage pixel-to-pixel correlations in self-attention feature maps to align cross-attention maps and combine three loss functions constrained by boundary attention to update latent features. Comprehensive experimental results on both L2I and non-L2I pretrained diffusion models demonstrate that our method outperforms existing training-free L2I techniques, both quantitatively and qualitatively, in terms of image composition on the DrawBench and HRS benchmarks.
title Training-Free Layout-to-Image Generation with Marginal Attention Constraints
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2411.10495