Filmmakers and visual artists routinely need to compose multiple references, actors, locations, props, cultural elements, into a single coherent shot, but existing tools either fail to scale past a handful of references or destroy fine grained subject identity in the process, since per reference tokenization scales memory linearly with reference count N and generated content often departs from the given references rather than reproducing them. We propose RefCompose, a pixel space compositional conditioning framework that decouples where things go from what they look like, via a single fixed resolution reference canvas that keeps conditioning size constant regardless of reference count. Spatial layout is induced at inference time from a frozen diffusion transformer and extracted via Grounding DINO, requiring no LLM or dedicated layout model, while dual stream LoRA adapters inject a layout derived depth map and the encoded canvas through separate low rank streams, disentangling geometric scaffolding from localized appearance. On the Dense Layout protocol, RefCompose consistently outperforms layout based and state of the art multi reference baselines on color, texture, shape, spatial accuracy, and identity/content preservation at higher reference counts, all with constant inference memory, making it a practical building block for multi subject cinematic composition at production scale.
Figures & tables
Figure 2: Overview of RefCompose: prompt-induced layout generation, correspondence-guided canvas construction, and decoupled structure-appearance conditioning via dual LoRA streams in the MMDiT blocks, preserving full-resolution identity at constant token complexity.
Method
N=2
N=4
N=6
CreatiLayout [ 22 ]
34.7
34.8
34.9
InstanceAssemble [ 29 ]
35.2
35.3
35.4
UNO [ 27 ]
60.1
74.8
OOM
XVerse [ 5 ]
59.6
75.3
OOM
RefCompose
69.0
69.0
69.0
Table 1: Peak GPU memory (GB) at inference for varying reference count N (batch size 1 ; single H100; 1280×720 ). UNO [ 27 ] and XVerse [ 5 ] scale with reference count and fail at N=6 ; RefCompose stays constant via canvas compression. OOM = out-of-memory.
Method
Region-wise Quality
Global-wise Quality
Spatial ↑
Color ↑
Texture ↑
Shape ↑
PICK ↑
DINO ↑
DINO refs↑
CLIP-I ↑
CLIP-T ↑
Layout-only baselines
CreatiLayout [ 22 ]
0.726
0.487
0.518
0.501
0.222
0.696
0.482
0.727
0.335
InstanceAssemble [ 29 ]
0.790
0.590
0.620
0.610
0.221
0.686
0.457
0.703
0.330
Reference-image baselines
UNO [ 27 ]
0.750
0.500
0.530
0.520
0.225
0.821
0.548
0.742
0.329
Table 2: Quantitative comparison on the Dense Layout test set [ 29 ] ( 5,000 images; mean 8.3 objects/image). Baselines use five references (UNO/XVerse cannot run beyond this on one H100); the N>5 RefCompose row uses additional references. Higher is better. Bold = best overall; improvement row compares RefCompose ( N>5 ) against the strongest reference-image baseline per metric.
Figure 4: Qualitative comparison of RefCompose against CreatiLayout, InstanceAssemble, UNO, and XVerse across seven multi-subject scenes (ground truth leftmost). Layout-conditioned baselines hallucinate appearance; token-based methods show subject drift and detail loss under multi-object composition. RefCompose reproduces both spatial arrangement and photometric identity most faithfully.
Multi-reference image generation requires preserving the appearance of multiple subjects while composing them into a coherent scene. However, existing diffusion transformers commonly encode references as dense visual token grids and jointly process them with global attention, making conditioning increasingly expensive as the number and resolution of references grow. We present RefRoute, a framework that addresses both reference representation cost and attention overhead through two complementary mechanisms. Compact residual conditioning combines low-resolution latent tokens with lightweight residual features extracted from full-resolution pixels, reducing reference token counts while retaining fine-grained appearance cues. Condition routing and attention routing align reference tokens with their assigned target regions and restrict cross-reference interactions, while allowing selective reference access beyond region boundaries for scene integration. We further introduce RefRoute-Data for training many-reference generation models and ManyRef100, a benchmark spanning human, object, and mixed compositions with 10-17 references. After many-reference fine-tuning, RefRoute achieves an overall Weighted-Ref-VIEScore of 36.06 on ManyRef100, compared with 8.88 for FLUX.2-Klein-9B. Separate inference-cost evaluations show substantially slower latency growth as the reference count increases: at 16 references, our 50-step and 4-step configurations achieve 18.3× and 14.2× speedups over their corresponding FLUX baselines, respectively. These results establish compact reference representations and spatially routed attention as an effective approach to scalable many-reference image generation.
Text-to-image diffusion models can generate individual concepts well, but they often omit or merge concepts incorrectly with multiple concepts. We trace these failures to an early coordination bottleneck: before denoising begins, prompt-conditioned attention may allocate different concepts to strongly overlapping spatial support, which can keep their attention coupled as denoising proceeds. This observation motivates treating compositional generation as a boundary-condition problem rather than repeatedly controlling the evolving trajectory. To this end, we propose Rectify-then-Diffuse (RTD), a training-free framework that rectifies the initial allocation once before standard denoising. Firstly, we propose Soft-Overlap Disentanglement (SOD), which converts normalized overlap between pilot concept maps into a differentiable and layout-agnostic separation objective. Secondly, we introduce Isotropic Gradient Rectification (IGR), which normalizes the SOD gradient and applies a bounded latent displacement with a consistent scale across prompts and initializations. Extensive experiments show that RTD achieves state-of-the-art compositional fidelity and robust gains. On the AE-Bench object pair subset, RTD improves BLIP-VQA by 45.8% and ImageReward by 19.6% over CO3 while running 2.3× faster. Code will be released at https://github.com/Z-yiwei/rectify-then-diffuse
Ning Zhu, An Chen, Mengfei Zhao +4
Glasgow College, University of Electronic Science and Technology of China · School of Mathematical Sciences, University of Electronic Science and Technology of China
Layout-guided multi-instance generation is essential for controllable image synthesis in Multi-Modal Diffusion Transformers (MM-DiTs). However, integrating this capability into unified architectures remains challenging. Prior frameworks rely on redundant full-resolution canvas padding and Shifted-RoPE to manage multiple reference images. This mechanism drastically inflates computational overhead for sparse layouts and disrupts critical low-frequency RoPE features, creating a severe spatial-frequency compromise that blurs absolute spatial correspondence. To overcome these limitations, we propose ControlRef, a highly efficient and precise multi-instance synthesis framework. ControlRef utilizes a Unified Instance-Layout Control (UILC) attention mask to strictly decouple inter-instance semantic interactions and enforce precise regional binding. To further promote region-level spatial alignment, we introduce Anchored 4D-RoPE, a novel positional encoding mechanism that directly anchors tokens to their absolute geometric centers. By pre-aligning reference images to their corresponding bounding box resolutions, physically anchoring both layout and reference tokens to their absolute geometric centers, and stacking the references along the z-axis, Anchored 4D-RoPE natively preserves spatial priors and mitigates the spatial-frequency compromise without lossy shifting. Extensive experiments demonstrate that ControlRef achieves state-of-the-art visual fidelity and localization accuracy, while concurrently slashing inference latency by over 80% in sparse layouts and reducing memory overhead by 50% in dense scenarios.
Yunkai Yang, Yudong Zhang, Xinying Chen +7
1Sun Yat-Sen University · 2Tsinghua University · 3Beijing Institute of Technology +1