Xiaorui Liu, Zhichao Hou, Weizhi Gao, Junqi Yin, Feiyi Wang, Linyu Peng
We lifted 32 functions out of this paper's own repositories and ran 16 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| weizhigao/modiff | canonical | 6 of 6 |
| WeizhiGao/MoDiff | — | 10 of 26 |
| Function | Status | Where it lives |
|---|---|---|
| BasicTransformerBlock | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("fe821a135405b676") |
| CrossAttention | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("edbc6b070aba0b51") |
| CrossQKMatMul | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("389bb673f605c6d2") |
| CrossSMVMatMul | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("9ec250f0fac4b765") |
| FeedForward | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("3abfca8077fe9d76") |
| QKVAttention | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("941d1452fb38ca5e") |
| QKVAttentionLegacy | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("90bafd5717a0d799") |
| SMVMatMul | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("a3c010461a312c81") |
| UniformAffineQuantizer | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("d88476b54e8ec555") |
| cross_attn_forward | Ran | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("86ac950feea0e0fd") |
| custom_to_np | Ran | weizhigao/modiff/scripts/sample_diffusion_ldm.py pointer only (licence: NONE) · get_code("834bbad6b027b869") |
| custom_to_pil | Ran | weizhigao/modiff/scripts/sample_diffusion_ldm.py pointer only (licence: NONE) · get_code("1f425be38a5fdeb5") |
| dict2namespace | Ran | weizhigao/modiff/scripts/sample_diffusion_ddim.py pointer only (licence: NONE) · get_code("584a23812bb846a3") |
| get_beta_schedule | Ran | weizhigao/modiff/scripts/sample_diffusion_ddim.py pointer only (licence: NONE) · get_code("ca0cea1ca1eeec89") |
| logs2pil | Ran | weizhigao/modiff/scripts/sample_diffusion_ldm.py pointer only (licence: NONE) · get_code("2eaadefc68b9b67f") |
| torch2hwcuint8 | Ran | weizhigao/modiff/scripts/sample_diffusion_ddim.py pointer only (licence: NONE) · get_code("c27a10ca9f6b75f3") |
| AttentionBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("df7a4ce615fa6435") |
| AttnBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("ae77b73557079f18") |
| BaseQuantBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("141229083c7d82ac") |
| QKMatMul | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("cdf30b4cf1e20928") |
| QuantAttentionBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("6fec188e5dfb1249") |
| QuantAttnBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("3767d1fd2725d986") |
| QuantBasicTransformerBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("aff831fe69321097") |
| QuantModel | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("a243ad022c69789a") |
| QuantModule | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("64b7930a97c62f16") |
| QuantQKMatMul | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("8c76a82ae15256d9") |
| QuantResBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("e5fc108495799e81") |
| QuantResnetBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("8bfaf266f4ee379f") |
| QuantSMVMatMul | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("e73fa8043b1b13e1") |
| ResBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("00e230e8cf8490b7") |
| ResnetBlock | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("0c239a04ebd27a00") |
| get_specials | Not yet run | WeizhiGao/MoDiff/qdiff/quant_model.py pointer only (licence: NONE) · get_code("40f7990566ab7d99") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Diffusion models have emerged as powerful generative models, but their high computation cost in iterative sampling remains a significant bottleneck. In this work, we present an in-depth and insightful study of state-of-the-art acceleration techniques for diffusion models, including caching and quantization, revealing their limitations in computation error and generation quality. To break these limits, this work introduces Modulated Diffusion (MoDiff), an innovative, rigorous, and principled framework that accelerates generative modeling through modulated quantization and error compensation. MoDiff not only inherents the advantages of existing caching and quantization methods but also serves as a general framework to accelerate all diffusion models. The advantages of MoDiff are supported by solid theoretical insight and analysis. In addition, extensive experiments on CIFAR-10 and LSUN demonstrate that MoDiff significant reduces activation quantization from 8 bits to 3 bits without performance degradation in post-training quantization (PTQ). Our code implementation is available at https: //github.com/WeizhiGao/MoDiff.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2506.22463")
get_code_for_paper("2506.22463")
have("2506.22463")
Connect an agent — have() is free.