arXiv:2610.39913cs.CVOct 2026

Manuscript Offprint

arXiv:2610.39913

TokenRepel: Generating Diverse Image Sets Without Compromising Quality

Qingtao Yu, Zhen Wang, Ning Lai, Boyang Hu, Hongdong Li, Dylan Campbell

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We present an inference-time approach that enhances the visual diversity of image sets generated by text-to-image models, without compromising the average image quality. Our method leverages the intrinsic geometry of hidden representations in pretrained models to diversify images generated from the same prompt. First, we introduce a token repulsion mechanism that increases the angle between feature tokens across samples. It takes a negative Riemannian gradient step on a von Mises–Fisher mixture distribution of tokens on the unit hypersphere. Second, to preserve the quality of each output image, we propose a token density preservation mechanism that projects the repulsion-induced prediction change onto a half-space aligned with the model's score direction. This encourages the updates to remain within the high-density regions learned by the generative model. We further extend this mechanism to the output of each intermediate layer, enabling finer-grained iterative guidance. We evaluate our method on three types of pretrained text-to-image models. Experiments show substantial gains in visual diversity under identical prompts, while maintaining a comparable level of image fidelity.

Preprint.

1 Introduction

Recent advances in text-to-image (T2I) generation have led to unprecedented levels of visual quality [1–6]. However, a challenge persists in the inherent trade-off between image quality and sample diversity [7–11]. Diversity, defined as a T2I model's ability to generate varied outputs for a fixed condition, is a critical component of generative modeling. Enhancing diversity can foster creativity and provide designers with a broader range of visual choices [11, 12], support data augmentation [13] and test-time scaling [14, 15], and increase the representation of ethnicities and genders underrepresented in the data [16]. Although diffusion and flow-matching models are capable of broad mode coverage, they may suffer from “mode gravity” during inference [17]. In these scenarios, models tend to generate highly similar outputs regardless of the random initial noise, focusing on a narrow subset of the data distribution to generate only the highest confidence samples.

Existing inference-time methods diversify samples by changing prompts or text conditioning [18, 11], optimizing initial noise [19, 20], or repelling image latents [21, 22]. More recent methods intervene in intermediate features, which carry richer information about the generated content [23, 24]. However, they treat each feature representation as a whole rather than explicitly modeling interactions between individual tokens. Token-level repulsion can act more selectively, pushing highly similar cross-image tokens apart while leaving unrelated tokens untouched. For example, a token representing a dog's paw should be repelled from a similar paw token in another image, but not from a sky token. NegToMe [25] follows this token-level approach, but its linear extrapolation has undesirable mathematical properties, limiting its effectiveness. It also lacks an explicit fidelity-preserving mechanism, which can introduce artifacts.

To address this problem, we present TokenRepel, a training-free algorithm for generating diverse image sets while preserving fidelity. To model cross-image token interactions, we represent the normalized tokens from other images as a von Mises–Fisher (vMF) mixture on the unit hypersphere. We then update each token with a negative Riemannian gradient step on this density, increasing the angular separation between similar tokens. To prevent these updates from degrading fidelity, we introduce a token density preservation mechanism. It projects the repulsion-induced prediction change onto a half-space aligned with the model's score direction, encouraging tokens to stay in high-density regions. We further extend this mechanism to intermediate layers, allowing for more frequent and fine-grained corrections. Together, token repulsion and token density preservation increase the diversity of generated images while largely maintaining their fidelity.

Our method applies to different architectures without requiring external models or additional training. We evaluate our approach on three representative T2I models: FLUX.1-dev [1] (flow-matching), SDXL [4] (diffusion), and FLUX.2-Klein [26] (few-step distilled flow-matching). We achieve a more favorable diversity–quality trade-off than existing inference-time methods. Our approach is simple and effective, with moderate computational overhead.

References (43)