Papers › Learning Stackable and Skippable LEGO Bricks for Efficient, Reconfigurable, and...

Learning Stackable and Skippable LEGO Bricks for Efficient, Reconfigurable, and Variable-Resolution Diffusion Modeling

10 Oct 2023arXiv:2310.06389archive 2025-07-28

Huangjie Zheng, Zhendong Wang, Jianbo Yuan, Guanghan Ning, Pengcheng He, Quanzeng You, Hongxia Yang, Mingyuan Zhou

Diffusion models excel at generating photo-realistic images but come with significant computational costs in both training and sampling. While various techniques address these computational challenges, a less-explored issue is designing an efficient and adaptable network backbone for iterative refinement. Current options like U-Net and Vision Transformer often rely on resource-intensive deep networks and lack the flexibility needed for generating images at variable resolutions or with a smaller network than used in training. This study introduces LEGO bricks, which seamlessly integrate Local-feature Enrichment and Global-content Orchestration. These bricks can be stacked to create a test-time reconfigurable diffusion backbone, allowing selective skipping of bricks to reduce sampling costs and generate higher-resolution images than the training data. LEGO bricks enrich local regions with an MLP and transform them using a Transformer block while maintaining a consistent full-resolution image across all bricks. Experimental results demonstrate that LEGO bricks enhance training efficiency, expedite convergence, and facilitate variable-resolution image generation while maintaining strong generative performance. Moreover, LEGO significantly reduces sampling time compared to other methods, establishing it as a valuable enhancement for diffusion models. Our code and project page are available at https://jegzheng.github.io/LEGODiffusion.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.06389")

Code

Syntology Ran 11 of 17 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 3 ran · honoured contract; 4 ran · our draft was wrong; 1 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

JegZheng/LEGODiffusion officialmentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 11 ran; 3 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
4ran · our draft was wrong
1ran · fixture could not drive it
3ran
6unverified

Licence: 0 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from JegZheng/LEGODiffusion. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

constant JegZheng/LEGODiffusion/torch_utils/misc.py official repository ran MIT (permissive) · 6d32f9cf6f29b386 · report
file_ext JegZheng/LEGODiffusion/dataset_tool.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · a2b45afa097b55b6 · report
find_latest_checkpoint JegZheng/LEGODiffusion/generate.py official repository ran fingerprinted MIT (permissive) · 54145599584b3b04 · report
format_time JegZheng/LEGODiffusion/dnnlib/util.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 674eca7b9e1b6439 · report
format_time_brief JegZheng/LEGODiffusion/dnnlib/util.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 32af001972a0699f · report
get_2d_sincos_pos_embed JegZheng/LEGODiffusion/training/lego_models.py official repository ran · honoured contract MIT (permissive) · c92c27c924b517e8 · report
maybe_min JegZheng/LEGODiffusion/dataset_tool.py official repository ran · honoured contract MIT (permissive) · dd1dc700e87f36cc · report
modulate JegZheng/LEGODiffusion/training/lego_models.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 03310bba324ae4fb · report
parse_int_list JegZheng/LEGODiffusion/generate.py official repository ran · honoured contract MIT (permissive) · cacd4f6ec202d9b4 · report
parse_tuple JegZheng/LEGODiffusion/dataset_tool.py official repository ran MIT (permissive) · 07b21b35ecb4815c · report
weight_init JegZheng/LEGODiffusion/training/networks.py official repository ran · fixture could not drive it MIT (permissive) · d41a4250066bce93 · report
ask_yes_no JegZheng/LEGODiffusion/dnnlib/util.py official repository unverified MIT (permissive) · 9d31d2c4cd16bb2d · report
edm_lego_sampler JegZheng/LEGODiffusion/generate.py official repository unverified MIT (permissive) · 38a46049a4af72ae · report
get_2d_sincos_pos_embed_from_grid JegZheng/LEGODiffusion/training/lego_models.py official repository unverified MIT (permissive) · 665d8a4e8f673a4c · report
is_persistent JegZheng/LEGODiffusion/torch_utils/persistence.py official repository unverified MIT (permissive) · e8b31ffccfa05efc · report
params_and_buffers JegZheng/LEGODiffusion/torch_utils/misc.py official repository unverified MIT (permissive) · b5ae713738eb4d27 · report
profiled_function JegZheng/LEGODiffusion/torch_utils/misc.py official repository unverified MIT (permissive) · f4664bbb3c2df6e0 · report

Tasks

Image Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Generation CelebA 64x64 LEGO FID 2.09 #13 of 39 Archive leaderboard report
Image Generation ImageNet 256x256 LEGO-XL FID 2.05 #50 of 94 Archive leaderboard report
Image Generation ImageNet 256x256 LEGO-XL Inception score 338.08 #50 of 94 Archive leaderboard report
Image Generation ImageNet 64x64 LEGO FID 2.16 #19 of 65 Archive leaderboard report
Image Generation ImageNet 64x64 LEGO Inception Score 78.7 #19 of 65 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEConcatenated Skip ConnectionConvolutionDense ConnectionsDiffusionDropoutLabel SmoothingLayer NormalizationLinear LayerMax PoolingMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformerU-NetVision Transformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections