通过密度引导控制生成图像细节,让模型在真实感与细节之间自由切换。
Devil is in the Details: Density Guidance for Detail-Aware Generation with Flow Models
- 基于流模型设计密度引导机制,精确调控生成样本的对数密度。
- 实验显示可在不降低质量前提下实现细节可控的生成效果。
- 适合需要精细调节图像细节的视觉生成任务研究者使用。
扩散模型能通过将噪声映射到数据分布生成高质量图像,但近期研究发现图像似然与感知质量并不一致:高似然样本通常平滑,而低似然样本更具细节。因此,控制样本密度对平衡真实感与细节至关重要。本文分析了现有技术先验引导(Prior Guidance),该方法通过缩放隐空间编码影响图像细节。我们提出评分对齐(score alignment)条件,解释其有效性,并证明该条件可对任意连续归一化流模型进行可计算验证。随后,我们提出密度引导(Density Guidance),一种对生成常微分方程(ODE)的合理修改,可在采样过程中实现精确的对数密度控制。最后,我们将密度引导扩展至随机采样,确保在结构或细粒度变化上保持精确的对数密度控制。实验表明,这些方法可在不牺牲样本质量的前提下,实现对图像细节的细粒度控制。代码已开源:https://github.com/Aalto-QuML/density-guidance。
原文摘要 · Abstract (English)
Diffusion models have emerged as a powerful class of generative models, capable of producing high-quality images by mapping noise to a data distribution. However, recent findings suggest that image likelihood does not align with perceptual quality: high-likelihood samples tend to be smooth, while lower-likelihood ones are more detailed. Controlling sample density is thus crucial for balancing realism and detail. In this paper, we analyze an existing technique, Prior Guidance, which scales the latent code to influence image detail. We introduce score alignment, a condition that explains why this method works and show that it can be tractably checked for any continuous normalizing flow model. We then propose Density Guidance, a principled modification of the generative ODE that enables exact log-density control during sampling. Finally, we extend Density Guidance to stochastic sampling, ensuring precise log-density control while allowing controlled variation in structure or fine details. Our experiments demonstrate that these techniques provide fine-grained control over image detail without compromising sample quality. Code is available at https://github.com/Aalto-QuML/density-guidance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。