Devil is in the Details: Density Guidance for Detail-Aware Generation with Flow Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Karczewski, Rafał, Heinonen, Markus, Garg, Vikas
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912399831859200
author Karczewski, Rafał
Heinonen, Markus
Garg, Vikas
author_facet Karczewski, Rafał
Heinonen, Markus
Garg, Vikas
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_05807
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Devil is in the Details: Density Guidance for Detail-Aware Generation with Flow Models
Karczewski, Rafał
Heinonen, Markus
Garg, Vikas
Machine Learning
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.
title Devil is in the Details: Density Guidance for Detail-Aware Generation with Flow Models
topic Machine Learning
url https://arxiv.org/abs/2502.05807