{"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/scalable-diffusion-models-with-transformers","title":"Scalable Diffusion Models with Transformers","arxiv_id":"2212.09748","date":"2022-12-19","proceeding":"ICCV 2023 1","authors":["William Peebles","Saining Xie"],"abstract":"We explore a new class of diffusion models based on the transformer architecture. We train latent diffusion models of images, replacing the commonly-used U-Net backbone with a transformer that operates on latent patches. We analyze the scalability of our Diffusion Transformers (DiTs) through the lens of forward pass complexity as measured by Gflops. We find that DiTs with higher Gflops -- through increased transformer depth/width or increased number of input tokens -- consistently have lower FID. In addition to possessing good scalability properties, our largest DiT-XL/2 models outperform all prior diffusion models on the class-conditional ImageNet 512x512 and 256x256 benchmarks, achieving a state-of-the-art FID of 2.27 on the latter.","url_abs":"https://arxiv.org/abs/2212.09748v2","url_pdf":"https://arxiv.org/pdf/2212.09748v2.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":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/facebookresearch/DiT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/FineDiffusion/FineDiffusion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/chuanyangjin/fast-dit","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/hustvl/dig","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/locuslab/get","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/milmor/diffusion-transformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/milmor/diffusion-transformer-keras","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/nyu-systems/grendel-gs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/senmaoy/RAT-Diffusion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/MindSpore-scientific/code-5/tree/main/Scalable-Sharpness-Aware-Minimization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/VachanVY/diffusion-transformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/huggingface/diffusers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"jax","reach":null},{"paper_slug":"scalable-diffusion-models-with-transformers","repo_url":"https://github.com/mindspore-lab/mindone","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"concatenated-skip-connection","method_name":"Concatenated Skip Connection"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"u-net","method_name":"U-Net"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-imagenet-256x256","task":"Image Generation","dataset":"ImageNet 256x256","model":"DiT-XL/2","rank_in_archive_order":54,"of":94,"metrics":{"FID":"2.27"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-512x512","task":"Image Generation","dataset":"ImageNet 512x512","model":"DiT-XL/2","rank_in_archive_order":41,"of":52,"metrics":{"FID":"3.04","Inception score":"240.82"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.09748","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.09748"}},"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/huggingface/diffusers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/DiT","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/VachanVY/diffusion-transformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/senmaoy/RAT-Diffusion","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/milmor/diffusion-transformer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/milmor/diffusion-transformer-keras","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/FineDiffusion/FineDiffusion","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-scientific/code-5/tree/main/Scalable-Sharpness-Aware-Minimization","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nyu-systems/grendel-gs","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/locuslab/get","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chuanyangjin/fast-dit","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mindspore-lab/mindone","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hustvl/dig","reach":null}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"ran_honours":2,"unverified":15},"by_repo_kind":{"listed":{"samples":16,"ran":3,"repositories":4}},"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":4,"samples":[{"code_sha256_prefix":"1712a07966b542ee","entry":"center_crop_arr","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"1712a07966b542ee"}},{"code_sha256_prefix":"e5947aba1d10885f","entry":"get_1d_sincos_pos_embed_from_grid","repo":"hustvl/dig","repo_kind":"listed","path":"models_dig.py","file_url":"https://github.com/hustvl/dig/blob/HEAD/models_dig.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e5947aba1d10885f"}},{"code_sha256_prefix":"c92c27c924b517e8","entry":"get_2d_sincos_pos_embed","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"c92c27c924b517e8"}},{"code_sha256_prefix":"03310bba324ae4fb","entry":"modulate","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"dit.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/dit.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03310bba324ae4fb"}},{"code_sha256_prefix":"393c618733caf957","entry":"shift_scale","repo":"VachanVY/diffusion-transformer","repo_kind":"listed","path":"torch_src/diffusion_transformer.py","file_url":"https://github.com/VachanVY/diffusion-transformer/blob/HEAD/torch_src/diffusion_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"393c618733caf957"}},{"code_sha256_prefix":"c5a04d1cab5f16a8","entry":"calculate_activation_statistics","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"fid.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/fid.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5a04d1cab5f16a8"}},{"code_sha256_prefix":"55d54369eada8946","entry":"calculate_activation_statistics","repo":"milmor/diffusion-transformer-keras","repo_kind":"listed","path":"fid.py","file_url":"https://github.com/milmor/diffusion-transformer-keras/blob/HEAD/fid.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55d54369eada8946"}},{"code_sha256_prefix":"ddaab4c77b3c0f3a","entry":"calculate_frechet_distance","repo":"milmor/diffusion-transformer-keras","repo_kind":"listed","path":"fid.py","file_url":"https://github.com/milmor/diffusion-transformer-keras/blob/HEAD/fid.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ddaab4c77b3c0f3a"}},{"code_sha256_prefix":"03149bec2314ebce","entry":"convBlock","repo":"milmor/diffusion-transformer-keras","repo_kind":"listed","path":"discriminator.py","file_url":"https://github.com/milmor/diffusion-transformer-keras/blob/HEAD/discriminator.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03149bec2314ebce"}},{"code_sha256_prefix":"deedff7c289ab393","entry":"create_loader","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"image_datasets.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/image_datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"deedff7c289ab393"}},{"code_sha256_prefix":"8382f7e48cc8a309","entry":"create_logger","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"8382f7e48cc8a309"}},{"code_sha256_prefix":"00999b7ce52789e2","entry":"deprocess","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00999b7ce52789e2"}},{"code_sha256_prefix":"177075a7f51b01e3","entry":"downBlock","repo":"milmor/diffusion-transformer-keras","repo_kind":"listed","path":"autoencoder.py","file_url":"https://github.com/milmor/diffusion-transformer-keras/blob/HEAD/autoencoder.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"177075a7f51b01e3"}},{"code_sha256_prefix":"665d8a4e8f673a4c","entry":"get_2d_sincos_pos_embed_from_grid","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"665d8a4e8f673a4c"}},{"code_sha256_prefix":"63749a9f8d05d87c","entry":"get_activations","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"fid.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/fid.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"63749a9f8d05d87c"}},{"code_sha256_prefix":"b3a0c9d9b68b0ba4","entry":"get_activations","repo":"milmor/diffusion-transformer-keras","repo_kind":"listed","path":"fid.py","file_url":"https://github.com/milmor/diffusion-transformer-keras/blob/HEAD/fid.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b3a0c9d9b68b0ba4"}},{"code_sha256_prefix":"91f16882dada16e4","entry":"get_diffution_transformer","repo":"VachanVY/diffusion-transformer","repo_kind":"listed","path":"torch_src/diffusion_transformer.py","file_url":"https://github.com/VachanVY/diffusion-transformer/blob/HEAD/torch_src/diffusion_transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"91f16882dada16e4"}},{"code_sha256_prefix":"1a5424f761d38323","entry":"get_scalings","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"diff_utils.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/diff_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a5424f761d38323"}},{"code_sha256_prefix":"fa7018efe2948b62","entry":"get_sigmas_karras","repo":"milmor/diffusion-transformer","repo_kind":"listed","path":"diff_utils.py","file_url":"https://github.com/milmor/diffusion-transformer/blob/HEAD/diff_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fa7018efe2948b62"}},{"code_sha256_prefix":"dd229bfb0b49b0d5","entry":"upBlock","repo":"milmor/diffusion-transformer-keras","repo_kind":"listed","path":"autoencoder.py","file_url":"https://github.com/milmor/diffusion-transformer-keras/blob/HEAD/autoencoder.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd229bfb0b49b0d5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}