Abstract: Recent DiT-based text-to-image models increasingly adopt LLMs as text encoders, yet text conditioning remains largely static and often utilizes only a single LLM layer, despite pronounced semantic hierarchy across LLM layers and non-stationary denoising dynamics over both diffusion time and network depth. To better match the dynamic process of DiT generation and thereby enhance the diffusion model's generative capability, we introduce a unified normalized convex fusion framework equipped with lightweight gates to systematically organize multi-layer LLM hidden states via time-wise, depth-wise, and joint fusion. Experiments establish Depth-wise Semantic Routing as the superior conditioning strategy, consistently improving text-image alignment and compositional generation (e.g., +9.97 on the GenAI-Bench Counting task). Conversely, we find that purely time-wise fusion can paradoxically degrade visual generation fidelity. We attribute this to a train-inference trajectory mismatch: under classifier-free guidance, nominal timesteps fail to track the effective SNR, causing semantically mistimed feature injection during inference. Overall, our results position depth-wise routing as a strong and effective baseline and highlight the critical need for trajectory-aware signals to enable robust time-dependent conditioning.
Introduction
Modern text-to-image generation relies heavily on Large Language Models (LLMs) to encode text prompts for Diffusion Transformers (DiTs). However, these models typically treat text conditioning as a static process, often utilizing only a single LLM layer (e.g., the penultimate layer) throughout the entire generation. This approach ignores the inherent hierarchies in both models: LLMs develop increasingly abstract semantic representations across their layers, while DiTs exhibit non-stationary dynamics, transitioning from global structure formation to fine-grained texture refinement.
Semantic Routing Framework
To address this, we introduce a unified normalized convex fusion framework that systematically organizes multi-layer LLM hidden states. Instead of selecting a single layer, we compute a weighted average of all LLM layers, stabilized by LayerNorm and normalized via softmax. We explore three primary routing strategies:
- Time-wise (S1): Weights adapt based on the diffusion timestep $t$.
- Depth-wise (S2): Weights adapt based on the receiving DiT block depth $d$.
- Joint (S3): Weights adapt based on both time and depth.
These weights are generated by a lightweight Time-Conditioned Fusion Gate (TCFG), a small MLP that processes timestep embeddings to output layer-specific weights.
Key Results and Insights
Our experiments demonstrate that Depth-wise Semantic Routing (S2) is the most effective strategy. By allowing different DiT blocks to selectively attend to specific LLM layers, the model achieves significantly better compositional reasoning. For instance, S2 yielded a +9.97 point improvement on the GenAI-Bench Counting task compared to standard static conditioning. It also outperformed state-of-the-art methods like FuseDiT on GenEval (67.07 vs 60.95) while adding negligible latency (~8%).
Neighbor Inhibition and Semantic Anchors
Analysis of the learned weights reveals a "neighbor inhibition" effect, where the model suppresses redundant information from adjacent LLM layers, focusing instead on distinct semantic "anchors." While the penultimate layer remains a strong anchor for initial layout, deeper DiT blocks often recruit features from other LLM layers to handle fine-grained details.
The Trajectory Mismatch Paradox
A surprising finding was that purely time-wise routing (S1) can degrade performance. We identify a "train-inference trajectory mismatch" as the cause. During inference, particularly under classifier-free guidance (CFG), the effective signal-to-noise ratio (SNR) evolves faster than the linear schedule used during training.
As shown in the figure above, the inference PSNR (blue) rises more sharply than the training schedule (orange). This mismatch means the time-gate provides "coarse" semantic instructions when the model is already in a "fine-detail" generation phase, leading to visual artifacts like blurriness.
Conclusion
Semantic Routing, particularly in its depth-wise form, provides a powerful and efficient mechanism for enhancing DiT-based generation. Our work highlights the importance of matching LLM semantic hierarchies to the dynamic needs of the diffusion process. Future work will focus on developing trajectory-aware signals that can adapt to the effective SNR during sampling, resolving the limitations of purely time-dependent conditioning.
Summary updated