[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-290670-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-290670-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","devil-is-in-the-details-density-guidance-for-detail-aware-generation-with-flow-models","Devil is in the Details - Density Guidance for Detail-Aware Generation with Flow Models","","Diffusion models generate high-quality images by mapping noise to a data distribution, but image likelihood does not reliably match perceptual quality: higher-likelihood samples often appear smoother, while lower-likelihood samples look more detailed. This work analyzes Prior Guidance and introduces score alignment to explain when latent-code scaling changes log-density. It then proposes Density Guidance for exact log-density control during deterministic ODE sampling, and extends it to stochastic sampling to retain precise control. Experiments show fine-grained detail control without degrading sample quality.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/devil-is-in-the-details-density-guidance-for-detail-aware-generation-with-flow-models/290670/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/devil-is-in-the-details-density-guidance-for-detail-aware-generation-with-flow-models/290670.png","ImageObject",300,407,{"name":42,"@type":43},"Levi","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-29","2026-09-17",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Why is sample density important in generative image modeling?","Question",{"text":63,"@type":64},"The paper explains that image likelihood correlates negatively with perceived detail: typical high-density samples tend to be smooth, while lower-density samples are more richly textured. Controlling density is therefore crucial for balancing realism and fine detail.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What does the paper contribute beyond Prior Guidance?",{"text":68,"@type":64},"It provides a theoretical condition, score alignment, that explains when Prior Guidance changes log-density. It also introduces Density Guidance, which modifies the generative ODE to enable exact log-density control during sampling.",{"name":70,"@type":61,"acceptedAnswer":71},"How is Density Guidance adapted for stochastic sampling?",{"text":72,"@type":64},"The method is extended so that even when randomness is introduced, log-density control remains precise while allowing controlled variation in structure or fine details.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},290670,1789642335,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":112,"slug":113},8,30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":111,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":4},7971461740909,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","This is an electronic reprint of the original article.  \nThis reprint may differ from the original in pagination and typographic detail.  \nKarczewski, Rafał; Heinonen, Markus; Garg, Vikas  \nDevil is in the Details : Density Guidance for Detail-Aware Generation with Flow Models  \nPublished in:  \nProceedings of Machine Learning Research  \nPublished: 01/01/2025  \nDocument Version  \nPublisher's PDF, also known as Version of record  \nPublished under the following license:  \nCC BY  \nPlease cite the original version:  \nKarczewski, R. , Heinonen, M. , & Garg, V. (2025) . Devil is in the Details : Density Guidance for Detail-Aware Generation with Flow Models. Proceedings of Machine Learning Research, 267, 29098-29127. [https://proceedings.mlr.press/v267/karczewski25a.html](https://proceedings.mlr.press/v267/karczewski25a.html)  \nThis material is protected by copyright and other intellectual property rights, and duplication or sale of all or part of any of the repository collections is not permitted, except that material may be duplicated by you foryour research use or educational purposes in electronic or print form. You must obtain permission for anyother use. Electronic or print copies may not be offered, whether for sale or otherwise to anyone who is not an authorised user.  \nDevil is in the Details: Density Guidance for Detail-Aware Generation with Flow Models  \nRafał Karczewski 1 Markus Heinonen 1 Vikas Garg 1 2  \nAbstract  \nDiffusion 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.  \nCode is available at [https://github.com/](https://github.com/)[ ](https://github.com/)[Aalto-QuML/density-guidance](Aalto-QuML/density-guidance.)[.](Aalto-QuML/density-guidance.)  \n1. Introduction  \nDiffusion models are a family of generative models that learn to map noise to a data distribution p0 , which allows realistic image sampling (Ho et al., 2020 ; Song et al., 2021b ;a; Vahdat et al., 2021) . In the quest towards high-fidelity sampling it is natural to ask whether perceptual quality of images aligns with their likelihood p0 (x) (Karczewski et al., 2025)?  \n1Department of Computer Science, Aalto University, Finland 2YaiYai Ltd. Correspondence to: Rafał Karczewski \u003C[rafal.karczewski@aalto.fi](rafal.karczewski@aalto.fi) > .  \nProceedings of the 42 nd International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025 . Copyright 2025 by the author(s) .  \nFigure 1 . Density guidance controls the amount of detail. Images sampled from the same condition and latent code with different strengths of guidance. Top: StableDiffusion v2.1 (Rombach  \net al., 2022) . Bottom: EDM2 (Karras et al., 2024b) .  \nRemarkably, the density p0 correlates negatively with the amount of detail: within the typical samples (Nalisnick et al., 2019) x ∼ p0 higher-density images tend to lack detail and be smooth, while lower-density images tend to be richly textured and detailed (Sehwag et al., 2022) (See F","cbCaikj8YtvVxfKy","https://ap.wps.com/l/cbCaikj8YtvVxfKy","pdf",9545728,31,"English","# Introduction\n## Problem: likelihood vs perceptual detail\n## Prior work and limitations of existing density control\n## Proposed approach: Prior Guidance analysis and score alignment\n## Density Guidance and stochastic extension","[{\"question\":\"Why is sample density important in generative image modeling?\",\"answer\":\"The paper explains that image likelihood correlates negatively with perceived detail: typical high-density samples tend to be smooth, while lower-density samples are more richly textured. Controlling density is therefore crucial for balancing realism and fine detail.\"},{\"question\":\"What does the paper contribute beyond Prior Guidance?\",\"answer\":\"It provides a theoretical condition, score alignment, that explains when Prior Guidance changes log-density. It also introduces Density Guidance, which modifies the generative ODE to enable exact log-density control during sampling.\"},{\"question\":\"How is Density Guidance adapted for stochastic sampling?\",\"answer\":\"The method is extended so that even when randomness is introduced, log-density control remains precise while allowing controlled variation in structure or fine details.\"}]","Devil is in the Details - Density Guidance for Detail-Aware Generation with Flow Models | PDF",78]