TL;DR
Fine-tuning diffusion models for specific tasks often degrades their ability to generate unconditional images. This paper proposes a simple, training-free method to fix this by replacing the degraded unconditional noise prediction with that from a high-quality, pre-trained diffusion model, significantly improving conditional generation quality.
What Problem Does This Paper Address?
Diffusion models have become a dominant force in generative AI, excelling at tasks like image, video, and audio synthesis. A key advantage is their ability to be adapted for conditional generation (e.g., generating an image based on text or another image) by fine-tuning a pre-trained unconditional model. The standard technique for this is Classifier-Free Guidance (CFG), which trains a single network to predict both conditional and unconditional noise. However, a common issue arises: when fine-tuning on a smaller, task-specific dataset, the model's capacity to accurately predict unconditional noise degrades. This degradation is problematic because CFG relies on combining both conditional and unconditional noise predictions. Poor unconditional priors lead to lower quality conditional outputs, a significant limitation for many fine-tuned diffusion models.
Methods
The core idea of this paper is surprisingly simple and training-free: leverage the strong unconditional priors from a well-trained diffusion model to "boost" the weak priors of a fine-tuned model.
The authors observe that in the CFG sampling process, the model predicts a combined noise estimate:
$\epsilon_{\theta_{cfg}}(x_t, c) = \epsilon_{\theta_{uncond}}(x_t, \emptyset) + \gamma (\epsilon_{\theta_{cond}}(x_t, c) - \epsilon_{\theta_{uncond}}(x_t, \emptyset))$
where $\epsilon_{\theta_{uncond}}(x_t, \emptyset)$ is the unconditional noise prediction from the fine-tuned model, $\epsilon_{\theta_{cond}}(x_t, c)$ is the conditional noise prediction, and $\gamma$ is the guidance scale.
The proposed method replaces the $\epsilon_{\theta_{uncond}}(x_t, \emptyset)$ term with the unconditional noise prediction from a different, high-quality pre-trained diffusion model (let's call it $\epsilon_{\psi_{uncond}}(x_t, \emptyset)$). The updated CFG noise prediction becomes:
$\epsilon_{\theta_{cfg}}(x_t, c) = \epsilon_{\psi_{uncond}}(x_t, \emptyset) + \gamma (\epsilon_{\theta_{cond}}(x_t, c) - \epsilon_{\psi_{uncond}}(x_t, \emptyset))$
This effectively "swaps out" the degraded unconditional prior of the fine-tuned model with a superior one, without requiring any retraining of the fine-tuned model itself. Crucially, the authors demonstrate that the replacement unconditional prior doesn't need to come from the exact base model that the fine-tuned model was originally derived from, nor does it need to share the same architecture.
Datasets
The paper evaluates its method on several established datasets used for conditional generation tasks:
- Zero-1-to-3: For novel view synthesis, evaluated on the Google Scanned Objects (GSO) dataset.
- Versatile Diffusion: For image variations, evaluated on COCO-Captions.
- DiT: For class-conditional generation, fine-tuned on SUN397, Food101, and Caltech101.
- DynamiCrafter: For text-and-image-to-video generation, evaluated using metrics from VBenchI2V.
- InstructPix2Pix: For instruction-based image editing, evaluated on the EditEvalv2 benchmark.
No new datasets were introduced.
Key Insights and Ideas
- The "Unconditional Prior Degradation" Problem is Real: Fine-tuning diffusion models, especially on smaller datasets, significantly harms their ability to generate good unconditional samples. This is a direct consequence of the joint training of conditional and unconditional noise prediction within CFG, where the limited capacity is often skewed towards the conditional task.
- Unconditional Priors are Crucial for Conditional Quality: The paper convincingly shows that the quality of the unconditional prior directly impacts the quality of conditional generation. A weak unconditional prior acts as a bottleneck, limiting the overall performance.
- Training-Free Fix is Surprisingly Effective: The most striking insight is that simply swapping the unconditional noise prediction during sampling, without any retraining, leads to substantial improvements. This highlights the modularity and robustness of diffusion model sampling.
- Flexibility in Unconditional Prior Source: The method is not tied to the original base model. Using unconditional noise from any strong diffusion model (even with different architectures, like SD2.1 or PixArt-a replacing SD1.4-based fine-tuned models) can yield benefits, suggesting a universal principle for improving conditional generation.
Key Results
The paper demonstrates significant improvements across various conditional generation tasks:
- Zero-1-to-3 (Novel View Synthesis): Achieved improvements in LPIPS, PSNR, and SSIM metrics, with the best results obtained using SD2.1 or PixArt-a as the unconditional prior. Qualitative examples show better lighting, color saturation, and shape fidelity.
- Versatile Diffusion (Image Variations): Showed improvements in FID and FDDINOV2 metrics, with comparable CLIP-I and DINOv2 image similarity, indicating better image quality without sacrificing condition alignment. Qualitative results highlight better handling of saturation and detail.
- DiT (Class-Conditional Generation): Fine-tuned DiT models showed improved FID scores, particularly on larger datasets, reinforcing the idea that degradation is amplified with limited data and computation.
- DynamiCrafter (Video Generation): Outperformed the baseline in 7 out of 9 VBenchI2V metrics, producing more temporally consistent and less distorted videos.
- InstructPix2Pix (Image Editing): Achieved better alignment with editing prompts and improved faithfulness, with qualitative examples showing more accurate edits and preserved identity.
Limitations and Future Work
- Increased Memory Cost: The primary limitation is the need to load a second diffusion model into memory, increasing computational resource requirements.
- Inference Time Overhead: While slight, there is a small increase in inference time due to the additional model loading and computation.
- Less Effective for Advanced Fine-tuning: The method is less effective for models that already have strong unconditional priors due to advanced fine-tuning techniques like adapter-based methods (e.g., ControlNet, GLIGEN).
- Future Work: The authors suggest exploring how to identify optimal unconditional priors for these advanced fine-tuning techniques as a promising future direction.
Summary updated