Abstract
Diffusion models typically reach a performance ceiling after extensive pre-training, where further training on the same dataset often leads to overfitting. We present Diffusion Model Patching (DMP), a lightweight method that introduces a small set of learnable prompts and a dynamic gating mechanism to a frozen pre-trained model. By specializing model behavior for different denoising stages, DMP achieves significant quality improvements (e.g., 10% FID reduction) with minimal parameter overhead (~1.4%).
Introduction
Training state-of-the-art diffusion models like Stable Diffusion or DiT is computationally intensive. Once these models converge, researchers often stop training because further iterations on the same data yield diminishing returns or even performance degradation. However, the diffusion process is inherently non-stationary: early stages (high noise) require global structural formation, while late stages (low noise) require fine-grained texture refinement. Standard models use a single set of parameters for all timesteps, failing to optimize for these shifting requirements. DMP addresses this by "patching" converged models with stage-specific expertise without the cost of full retraining.
Methods
DMP introduces two primary components to a frozen pre-trained diffusion model:
- Learnable Prompt Pool: A set of continuous embeddings is inserted into the input space of each model block. Unlike traditional prompt tuning that increases sequence length, DMP adds these prompts element-wise to existing inputs, preserving computational efficiency.
- Dynamic Gating (Mixture-of-Prompts): A small gating network conditioned on the denoising timestep $t$ dynamically blends prompts from the pool. This creates a "mixture-of-prompts" tailored to the specific noise level of the current generation step.
To ensure a stable starting point, DMP employs Zero-initialization, where prompts begin at zero so the model initially reproduces its original performance. Balancing losses are also used to prevent the gating network from collapsing into a subset of the prompt pool.
Results
The effectiveness of DMP was evaluated on FFHQ (unconditional), MS-COCO (text-to-image), and Laion5B (Stable Diffusion v1.5).
Breaking the Convergence Ceiling
On the FFHQ dataset, a converged DiT-L/2 model was further trained using different strategies. While standard fine-tuning led to overfitting and increased FID, DMP continued to improve performance.
Key findings include:
- Quality Gains: DMP improved the FID of the DiT-L/2 model by 10.38% (from 6.26 to 5.61) in 50K iterations.
- Efficiency: The method adds only ~1.43% additional parameters while outperforming full-model fine-tuning.
- Versatility: DMP is effective across both Transformer-based (DiT) and UNet-based (Stable Diffusion) architectures. For Stable Diffusion v1.5 on Laion5B, FID dropped from 47.18 to 35.44.
Discussion
DMP can be conceptualized through an "artist" analogy: the frozen model acts as the artist, and the prompt pool serves as a "color palette." By dynamically choosing mixtures of prompts based on the generation stage, the model can more effectively steer its pre-existing knowledge. While DMP requires a secondary training phase, its efficiency and ability to bypass the convergence ceiling make it a powerful tool for squeezing extra performance out of existing models. Future research may explore applying this "Mixture-of-Prompts" approach to transfer learning and domain adaptation.
Summary updated