Introduction
While diffusion models have achieved remarkable success in text-to-image generation, users often require more granular control. Tools like ControlNet and IP-Adapter have introduced spatial guidance (depth, edges) and reference-based subject consistency. However, existing frameworks typically struggle when multiple conditions are applied simultaneously. They often suffer from "feature entanglement," where different control signals interfere with each other, or they are limited to older UNet architectures.
UniCombine addresses these challenges by introducing a unified framework for Diffusion Transformers (DiTs), such as FLUX.1, enabling the seamless combination of diverse conditions—including text prompts, spatial maps, and reference subjects—without mutual interference.
Architectural Innovations
UniCombine is built upon the FLUX.1-schnell DiT model and introduces two primary innovations to handle complex multi-conditional inputs:
1. LoRA Switching Module
Rather than training a monolithic multi-condition model from scratch, UniCombine leverages pre-trained, single-condition LoRAs. A dynamic switching module activates the appropriate LoRAs based on the specific combination of user inputs, ensuring modularity and high-quality results without massive retraining.
2. Conditional MMDiT Attention (CMMDiT)
Standard attention mechanisms scale quadratically $O(N^2)$ with the number of conditions and often lead to feature bleeding. CMMDiT restructures the attention routing: conditional branches are restricted to self-attention when acting as queries, while the main image and text branches are permitted to attend to all conditions. This reduces complexity to $O(N)$ and preserves the purity of each control signal, preventing a depth map from accidentally influencing the color of a subject.
The framework offers both a training-free version for zero-shot combination and a training-based version that utilizes a lightweight "Denoising-LoRA" to optimize attention score distributions across multiple inputs for production-quality visual harmony.
Dataset: SubjectSpatial200K
To support this research, the authors introduced SubjectSpatial200K, a new dataset containing over 139,000 training samples. It combines subject grounding masks (via Mamba-YOLO-World) with depth and Canny edge maps (via Depth-Anything), providing the first large-scale resource for simultaneous subject-driven and spatially-aligned training.
Performance and Results
UniCombine consistently outperforms specialized baselines across various tasks:
- Multi-Spatial Control: Achieved an FID of 6.82, significantly better than UniControlNet's 20.96.
- Subject Consistency: In subject-insertion tasks, it reached a CLIP-I score of 97.14, surpassing models like AnyDoor.
- Subject-Spatial Integration: In complex scenarios combining subjects with depth maps, UniCombine maintained high subject fidelity (94.47 CLIP-I) while strictly adhering to spatial constraints.
Conclusion
UniCombine represents a significant step toward universal generative control. By decoupling conditional attention and utilizing a modular LoRA approach, it provides a scalable and efficient solution for multi-conditional image synthesis. Future work suggests extending this framework to reference-based stylization, potentially positioning UniCombine as a central hub for diverse generative tasks.
Summary updated