{"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/aid-attention-interpolation-of-text-to-image","title":"AID: Attention Interpolation of Text-to-Image Diffusion","arxiv_id":"2403.17924","date":"2024-03-26","proceeding":null,"authors":["Qiyuan He","Jinghao Wang","Ziwei Liu","Angela Yao"],"abstract":"Conditional diffusion models can create unseen images in various settings, aiding image interpolation. Interpolation in latent spaces is well-studied, but interpolation with specific conditions like text or poses is less understood. Simple approaches, such as linear interpolation in the space of conditions, often result in images that lack consistency, smoothness, and fidelity. To that end, we introduce a novel training-free technique named Attention Interpolation via Diffusion (AID). Our key contributions include 1) proposing an inner/outer interpolated attention layer; 2) fusing the interpolated attention with self-attention to boost fidelity; and 3) applying beta distribution to selection to increase smoothness. We also present a variant, Prompt-guided Attention Interpolation via Diffusion (PAID), that considers interpolation as a condition-dependent generative process. This method enables the creation of new images with greater consistency, smoothness, and efficiency, and offers control over the exact path of interpolation. Our approach demonstrates effectiveness for conceptual and spatial interpolation. Code and demo are available at https://github.com/QY-H00/attention-interpolation-diffusion.","url_abs":"https://arxiv.org/abs/2403.17924v3","url_pdf":"https://arxiv.org/pdf/2403.17924v3.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":"aid-attention-interpolation-of-text-to-image","repo_url":"https://github.com/qy-h00/attention-interpolation-diffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"spatial-interpolation","task_name":"Spatial Interpolation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.17924","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.17924"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qy-h00/attention-interpolation-diffusion","reach":{"status":"ok"}}],"summary":{"ran":7,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":10,"ran":9,"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":10,"samples":[{"code_sha256_prefix":"0f016a091159da2e","entry":"generate_beta_tensor","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/prior.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/prior.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0f016a091159da2e"}},{"code_sha256_prefix":"ffec71b9cfa36019","entry":"image_grids","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/utils.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ffec71b9cfa36019"}},{"code_sha256_prefix":"1af833d08bf5550a","entry":"linear_interpolation","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/interpolation.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/interpolation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1af833d08bf5550a"}},{"code_sha256_prefix":"345554a5211e53cc","entry":"load_and_process_images","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/utils.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"345554a5211e53cc"}},{"code_sha256_prefix":"bea2d776a332f2b0","entry":"rescale_noise_cfg","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/pipeline_interpolated_sd.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/pipeline_interpolated_sd.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bea2d776a332f2b0"}},{"code_sha256_prefix":"3338a5b299ea25ec","entry":"retrieve_timesteps","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/pipeline_interpolated_sd.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/pipeline_interpolated_sd.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3338a5b299ea25ec"}},{"code_sha256_prefix":"35717b791550ecb2","entry":"retrieve_timesteps","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/pipeline_interpolated_sdxl.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/pipeline_interpolated_sdxl.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"35717b791550ecb2"}},{"code_sha256_prefix":"179863142b812e70","entry":"slerp","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/interpolation.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/interpolation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"179863142b812e70"}},{"code_sha256_prefix":"417e401f1e61df9d","entry":"spherical_interpolation","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/interpolation.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/interpolation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"417e401f1e61df9d"}},{"code_sha256_prefix":"cb055919e98c5efa","entry":"compute_lpips","repo":"qy-h00/attention-interpolation-diffusion","repo_kind":"official","path":"gradio_src/utils.py","file_url":"https://github.com/qy-h00/attention-interpolation-diffusion/blob/HEAD/gradio_src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cb055919e98c5efa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}