Consistent text-to-image generation via scene de-contextualization
Song Tang, Peihao Gong, Kunyu Li, Kai Guo, Boyu Wang, Mao Ye, Jianwei Zhang, Xiatian Zhu
TL;DR
This work identifies scene contextualization as a principal source of identity shift in text-to-image generation, arising from attention-based coupling between subject prompts and scene context. It provides theoretical bounds on contextualization strength and introduces Scene De-Contextualization (SDeC), a training-free prompt-embedding editing method that detects and suppresses the latent scene–ID correlation subspace via forward-backward SVD optimization and eigenvalue reweighting, enabling per-scene prompts without requiring knowledge of all target scenes. Empirically, SDeC delivers improved identity preservation while maintaining scene diversity across multiple backbones and tasks, and it demonstrates compatibility with additional generative controls (e.g., pose maps) and complementary methods. The results offer a flexible, scalable approach for real-world applications where target scenes are dynamic or unavailable in advance, advancing practical consistency in T2I systems.
Abstract
Consistent text-to-image (T2I) generation seeks to produce identity-preserving images of the same subject across diverse scenes, yet it often fails due to a phenomenon called identity (ID) shift. Previous methods have tackled this issue, but typically rely on the unrealistic assumption of knowing all target scenes in advance. This paper reveals that a key source of ID shift is the native correlation between subject and scene context, called scene contextualization, which arises naturally as T2I models fit the training distribution of vast natural images. We formally prove the near-universality of this scene-ID correlation and derive theoretical bounds on its strength. On this basis, we propose a novel, efficient, training-free prompt embedding editing approach, called Scene De-Contextualization (SDeC), that imposes an inversion process of T2I's built-in scene contextualization. Specifically, it identifies and suppresses the latent scene-ID correlation within the ID prompt's embedding by quantifying the SVD directional stability to adaptively re-weight the corresponding eigenvalues. Critically, SDeC allows for per-scene use (one scene per prompt) without requiring prior access to all target scenes. This makes it a highly flexible and general solution well-suited to real-world applications where such prior knowledge is often unavailable or varies over time. Experiments demonstrate that SDeC significantly enhances identity preservation while maintaining scene diversity.
