AlignedGen: Aligning Style Across Generated Images

🔥 NeurIPS 2025

TL;DR: Input a set of prompts, AlignedGen can generate images with consist style.

Peking University
Corresponding author

Case Show

Explore generated results with corresponding prompts.

Abstract

Despite their generative power, diffusion models struggle to maintain style consistency across images conditioned on the same style prompt, hindering their practical deployment in creative workflows. While several training-free methods attempt to solve this, they are constrained to the U-Net architecture, which not only leads to low-quality results and artifacts like object repetition but also renders them incompatible with superior Diffusion Transformer (DiT). To address these issues, we introduce AlignedGen, a novel training-free framework that enhances style consistency across images generated by DiT models. Our work first reveals a critical insight: naive attention sharing fails in DiT due to conflicting positional signals from improper position embeddings. We introduce Shifted Position Embedding (ShiftPE), an effective solution that resolves this conflict by allocating a non-overlapping set of positional indices to each image. Building on this foundation, we develop Advanced Attention Sharing (AAS), a suite of three techniques meticulously designed to fully unleash the potential of attention sharing within the DiT. Furthermore, to broaden the applicability of our method, we present an efficient query, key, and value feature extraction algorithm, enabling our method to seamlessly incorporate external images as style references.

Method

AlignedGen Method Overview

Overview of the AlignedGen framework. (a) Overall pipeline, where our ShiftPE and AAS module are integrated into specific layers of DiT, replacing the MM-Attention. (b)(c) Detailed illustrations of the ShiftPE and AAS, respectively. (d) Procedure for extracting features from a user-provided style reference image, which serve as input to the AAS module.

ShiftPE Analysis

AlignedGen Method Overview

ShiftPE decouples attention from spatial location to enable semantic correspondence. We visualize attention map originating from a query point (red box). (a) RoPE exhibits a strong spatial bias, rigidly constraining attention to the same coordinates in the reference image and causing content leakage. (b) ShiftPE breaks this spatial dependency, allowing attention to focus on broader, semantically relevant regions (e.g., the surrounding snowy landscape). (c) The plot of attention weight summed by L1 distance quantitatively confirms this: ShiftPE distributes attention across a wider area, whereas RoPE's attention is sharply localized at the query's exact coordinates.

Compare With Others

AlignedGen Method Overview

Support User-Provided Image As Reference

AlignedGen Method Overview

DreamBooth

AlignedGen Method Overview

Depth Control

AlignedGen Method Overview

BibTeX

@article{zhang2025alignedgen,
  title={AlignedGen: Aligning Style Across Generated Images},
  author={Zhang, Jiexuan and Du, Yiheng and Wang, Qian and Li, Weiqi and Gu, Yu and Zhang, Jian},
  journal={arXiv preprint arXiv:2509.17088},
  year={2025}
}