Boosting Resolution Generalization of Diffusion Transformers with Randomized Positional Encodings

Liang Hou, Cong Liu, Mingwu Zheng, Xin Tao, Pengfei Wan +2 more
3/24/2025
cs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Resolution generalization in image generation tasks enables the production of higher-resolution images with lower training resolution overhead. However, a key obstacle for diffusion transformers in addressing this problem is the mismatch between positional encodings seen at inference and those used during training. Existing strategies such as positional encodings interpolation, extrapolation, or hybrids, do not fully resolve this mismatch. In this paper, we propose a novel two-dimensional randomized positional encodings, namely RPE-2D, that prioritizes the order of image patches rather than their absolute distances, enabling seamless high- and low-resolution generation without training on multiple resolutions. Concretely, RPE-2D independently samples positions along the horizontal and vertical axes over an expanded range during training, ensuring that the encodings used at inference lie within the training distribution and thereby improving resolution generalization. We further introduce a simple random resize-and-crop augmentation to strengthen order modeling and add micro-conditioning to indicate the applied cropping pattern. On the ImageNet dataset, RPE-2D achieves state-of-the-art resolution generalization performance, outperforming competitive methods when trained at $256^2$ and evaluated at $384^2$ and $512^2$, and when trained at $512^2$ and evaluated at $768^2$ and $1024^2$. RPE-2D also exhibits outstanding capabilities in low-resolution image generation, multi-stage training acceleration, and multi-resolution inheritance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hou2025boosting,
  title  = {Boosting Resolution Generalization of Diffusion Transformers with Randomized Positional Encodings},
  author = {Liang Hou and Cong Liu and Mingwu Zheng and Xin Tao and Pengfei Wan and Di Zhang and Kun Gai},
  year   = {2025},
  eprint = {2503.18719},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.18719v2}
}

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/2503.18719.svg)](https://codeofpaper.com/paper/2503.18719)

Discussion