{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/applying-guidance-in-a-limited-interval","title":"Applying Guidance in a Limited Interval Improves Sample and Distribution Quality in Diffusion Models","arxiv_id":"2404.07724","date":"2024-04-11","proceeding":null,"authors":["Tuomas Kynkäänniemi","Miika Aittala","Tero Karras","Samuli Laine","Timo Aila","Jaakko Lehtinen"],"abstract":"Guidance is a crucial technique for extracting the best performance out of image-generating diffusion models. Traditionally, a constant guidance weight has been applied throughout the sampling chain of an image. We show that guidance is clearly harmful toward the beginning of the chain (high noise levels), largely unnecessary toward the end (low noise levels), and only beneficial in the middle. We thus restrict it to a specific range of noise levels, improving both the inference speed and result quality. This limited guidance interval improves the record FID in ImageNet-512 significantly, from 1.81 to 1.40. We show that it is quantitatively and qualitatively beneficial across different sampler parameters, network architectures, and datasets, including the large-scale setting of Stable Diffusion XL. We thus suggest exposing the guidance interval as a hyperparameter in all diffusion models that use guidance.","url_abs":"https://arxiv.org/abs/2404.07724v2","url_pdf":"https://arxiv.org/pdf/2404.07724v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"applying-guidance-in-a-limited-interval","repo_url":"https://github.com/kynkaat/guidance-interval","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"applying-guidance-in-a-limited-interval","repo_url":"https://github.com/vectorspacelab/omnigen2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-imagenet-512x512","task":"Image Generation","dataset":"ImageNet 512x512","model":"EDM2-XXL w/ guidance interval","rank_in_archive_order":9,"of":52,"metrics":{"FID":"1.40"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-512x512","task":"Image Generation","dataset":"ImageNet 512x512","model":"EDM2-S w/ guidance interval","rank_in_archive_order":14,"of":52,"metrics":{"FID":"1.68"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.07724","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.07724"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/kynkaat/guidance-interval","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vectorspacelab/omnigen2","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"ran_draft_wrong":2,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"4f8bb5961682a237","entry":"compute_fid","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"metrics/frechet_inception_distance.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/metrics/frechet_inception_distance.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4f8bb5961682a237"}},{"code_sha256_prefix":"7778f5836023c242","entry":"count_images_in_zip","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"utils.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7778f5836023c242"}},{"code_sha256_prefix":"20795df1064e5659","entry":"decode_latents","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"sampling/sample_images.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/sampling/sample_images.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"20795df1064e5659"}},{"code_sha256_prefix":"674eca7b9e1b6439","entry":"format_time","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/dnnlib/util.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"674eca7b9e1b6439"}},{"code_sha256_prefix":"32af001972a0699f","entry":"format_time_brief","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/dnnlib/util.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"32af001972a0699f"}},{"code_sha256_prefix":"9d31d2c4cd16bb2d","entry":"ask_yes_no","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/dnnlib/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9d31d2c4cd16bb2d"}},{"code_sha256_prefix":"a1b475ef1c3f3263","entry":"edm_sampler","repo":"kynkaat/guidance-interval","repo_kind":"official","path":"sampling/edm_sampler.py","file_url":"https://github.com/kynkaat/guidance-interval/blob/HEAD/sampling/edm_sampler.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a1b475ef1c3f3263"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}