Abstract
Text-to-image (T2I) diffusion models excel at generating photorealisticimages but often fail to render accurate spatial relationships. We identify twocore issues underlying this common failure: 1) the ambiguous nature of dataconcerning spatial relationships in existing datasets, and 2) the inability ofcurrent text encoders to accurately interpret the spatial semantics of inputdescriptions. We propose CoMPaSS, a versatile framework that enhances spatialunderstanding in T2I models. It first addresses data ambiguity with the SpatialConstraints-Oriented Pairing (SCOP) data engine, which curatesspatially-accurate training data via principled constraints. To leverage thesepriors, CoMPaSS also introduces the Token ENcoding ORdering (TENOR) module,which preserves crucial token ordering information lost by text encoders,thereby reinforcing the prompt's linguistic structure. Extensive experiments onfour popular T2I models (UNet and MMDiT-based) show CoMPaSS sets a new state ofthe art on key spatial benchmarks, with substantial relative gains on VISOR(+98%), T2I-CompBench Spatial (+67%), and GenEval Position (+131%). Code isavailable at https://github.com/blurgyy/CoMPaSS.