Recent advances in text-to-image (T2I) generation have enabled visually coherent image synthesis from descriptions, but generating images containing multiple given subjects remains challenging. As the number of reference identities increases, existing methods often suffer from subject missing and semantic drift. To address this problem, we propose MUSIC, the first MLLM specifically designed for MUlti-Subject In-Context image generation. To overcome the data scarcity, we introduce an automatic and scalable data generation pipeline that eliminates the need for manual annotation. Furthermore, we enhance the model's understanding of multi-subject semantic relationships through a vision chain-of-thought (CoT) mechanism, guiding step-by-step reasoning from subject images to semantics and generation. To mitigate identity entanglement and manage visual complexity, we develop a novel semantics-driven spatial layout planning method and demonstrate its test-time scalability. By incorporating complex subject images during training, we improve the model's capacity for chained reasoning. In addition, we curate MSIC, a new benchmark tailored for multi-subject in-context generation. Experimental results demonstrate that MUSIC significantly surpasses other methods in both multi- and single-subject scenarios.
Figures & tables
Figure 1: Top: Comparison of our MUSIC (bottom) v.s. the subject-to-image method UNO (top). Bottom: UNO struggles as the number of subject images grows. Our MLLM-based method uses a thinking mechanism and more effectively generates the scene with multi-subjects.
Figure 2: Overview of our data construction pipeline: (a) An LLM and T2I model generate the target image, followed by an OVD model detecting subjects. A VLM filters out unsuitable objects, and an I2I model creates transformed subject images. (b) A VLM produces simulated user instructions and CoT instructions. A segmentation model generates segmentation masks, yielding a semantics-driven spatial layout textual description. (c) Application of the constructed data pair in the training pipeline.
Method
DINO ↑
CLIP-I ↑
CLIP-T ↑
Oracle (caption)
-
-
0.339
Subject Diffusion Ma et al. (2024)
0.513
0.702
0.287
MIP-Adapter Huang et al. (2025)
0.497
0.715
0.288
MS-Diffusion Wang et al. (2024a)
0.532
0.714
0.290
OmniGen Xiao et al. (2024)
0.525
0.714
0.300
UNO Wu et al. (2025)
0.541
0.721
0.296
Table 1: Performance comparison on the MSIC (multi-subject in-context generation). MUSIC* refers to our method with test-time scaling. Oracle uses ground-truth captions.
Method
DINO ↑
CLIP-I ↑
CLIP-T ↑
Oracle (reference images)
0.774
0.885
-
Textual Inversion Gal et al. (2022)
0.569
0.780
0.255
DreamBooth Ruiz et al. (2023)
0.668
0.803
0.305
BLIP-Diffusion Li et al. (2023)
0.670
0.805
0.302
ELITE Wei et al. (2023)
0.647
0.772
0.296
Re-Imagen Chen et al. (2022)
0.600
0.740
0.270
Table 2: Performance comparison of different methods on Dreambench (single-subject in-context generation).
Figure 3: Human evaluation results comparing the MUSIC against OmniGen and UNO.
Figure 4: Ablation study. “w/o CC” (Complex Case data augmentation); “w/o P” (Complex Case and spatial layout planning); “w/o CoT” (Complex Case, spatial planning, and Chain-of-Thought reasoning).
Figure 5: Performance of MUSIC as a function of the number of subjects on the MSIC.
Figure 6: Performance of MUSIC trained on Vision CoT data from Qwen2.5-VL (3B, 7B and 32B). “w/ GT CoT-Data” denotes inference with ground-truth CoT from Qwen2.5-VL, which further boosts generation quality.
Figure 7: Qualitative comparison of multi-subject image generation results from MUSIC (Ours) against UNO and OmniGen . Each row shows the reference images, input prompt, and generated images.
Figure 8: Effectiveness of test-time scaling using Semantics-Driven Spatial Layout Planning.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Method
DINO ↑
CLIP-I ↑
CLIP-T ↑
SDXL + IP-Adapter
0.571
0.738
0.294
PixArt- Σ + IP-Adapter
0.583
0.746
0.298
DiT-XL + Subject Adapter
0.589
0.751
0.301
UNO (FLUX-1.0-DEV)
0.541
0.721
0.296
MUSIC (Ours)
0.622
0.812
0.322
Appendix
Table 3: Comparison with strong diffusion backbones adapted for subject-driven generation on MSIC.
Pipeline Stage
Failure Rate (%)
Mitigation Strategy
T2I semantic mismatch
9.8
Prompt filtering and regeneration
OVD miss / false detection
14.6
Area threshold + VLM verification
VLM hallucinated validation
6.3
ID-string consistency check
SAM2 incorrect mask
11.2
CLIP-based mask vs. box selection
Final retained samples
68.1%
Appendix
Table 4: Per-stage error rates and mitigation strategies in the data construction pipeline.
Method
Patch IoU ↑
Category Coverage ↑
Random layout
0.21
0.48
UNO (implicit layout)
0.34
0.61
MUSIC (predicted layout)
0.47
0.76
Appendix
Table 5: Agreement between predicted spatial layouts and segmentation masks.
Method
Relation Accuracy ↑
Identity Fidelity ↑
UNO
0.63
0.72
MUSIC
0.74
0.81
Appendix
Table 6: Performance on relative spatial relation prompts on MSIC.
School of Information Science and Engineering, East China University of Science and Technology, Shanghai 200237, China · Center for Applied Mathematics, Tianjin University, Tianjin 300072, China