AlignedGen: Aligning Style Across Generated Images

Jiexuan Zhang, Yiheng Du, Qian Wang, Weiqi Li, Yu Gu +1 more
9/21/2025
cs.CV

No official code found. Best implementation: Jiexuanz/AlignedGen (29 stars, Apache-2.0, last commit 2025-10-22).

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. Extensive experimental results validate that our method effectively enhances style consistency across generated images while maintaining precise text-to-image alignment.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[NeurIPS 2025 🔥] Official impl. of "AlignedGen: Aligning Style Across Generated Images". An ultra-simple, user-friendly yet state-of-the-art codebase for style-aligned image generation!

291PythonSep 21, 202512 months agoApache-2.0

Similar Papers

Cite this paper

@article{zhang2025alignedgen,
  title  = {AlignedGen: Aligning Style Across Generated Images},
  author = {Jiexuan Zhang and Yiheng Du and Qian Wang and Weiqi Li and Yu Gu and Jian Zhang},
  year   = {2025},
  eprint = {2509.17088},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.17088v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.17088.svg)](https://codeofpaper.com/paper/2509.17088)

Discussion