                  BiMaCoSR: Binary One-Step Diffusion Model
         Leveraging Flexible Matrix Compression for Real Super-Resolution

                                 Kai Liu * 1 Kaicheng Yang * 1 Zheng Chen 1 Zhiteng Li 1
                                 Yong Guo 2 Wenbo Li 3 Linghe Kong† 1 Yulun Zhang† 1
A. One Step Diffusion Distillation                                     B. More Visualizations on Three Branches
A.1. Diffusion Process Formulation                                     We provide more visual comparison result in this section to
                                                                       demonstrate the role of each branch in this section.
Following ResShift and SinSR(Yue et al., 2024; Wang et al.,
2024), the diffusion process incorporates the low-resolution
                                                                       B.1. Rank of Paramter Matrix
(LR) image y into the noisy step xt . The forward diffusion
process is formulated as:                                              Firstly, we provide the rank numbers of the parameter ma-
                                                                       trices in the LRMB and SMB branches to demonstrate that
      q(xt |x0 , y) = N (xt ; x0 + ηt (y − x0 ), κ2 ηt I),   (1)       SMB effectively enhances the diversity of transmitted infor-
                                                                       mation in Fig 1.When only LRMB is used, the rank of the
where ηt is a time-dependent hyperparameter. The initial               parameter matrix is very low, which means that a significant
state xT integrates information from y:                                amount of activation information is lost. However, after
                       √                                               combining SMB, we can transmit high-rank FP activation
             xT = y + κ ηT ϵ,         ϵ ∼ N (0, I).          (2)       information. This implies that LRMB serves as a mecha-
                                                                       nism for integrating the primary information, while SMB
The reverse process follows:                                           preserves the diversity of information.

                       x̂0 = fθ (xt , y, t)                  (3)       Second, we provide a mathematical estimation of the rank of
                                                                       the parameter matrix in the BMB branch.For an n × n fully
where the coefficients kt , mt , jt are defined as:                    random binary matrix A, where each entry independently
                                                                       takes the value -1 with probability p and 1 with probability
               q                                                      1 − p, the expected rank satisfies:
        
         mt = ηt−1 ηt ,
                       √
        
          jt = ηt−1 − ηt−1 ηt ,                              (4)
                          √          q                                                E[rank(A)] = n − O(log n).                  (6)
        k = 1 − η           ηt−1 ηt − ηt−1
        
           t         t−1 +              ηt .                           This indicates that such matrices are almost full rank with
                                                                       high probability, as the number of linearly dependent rows is
Here, x̂0 = fθ (xt , y, t) represents the estimated HR image           typically small. This further implies that BMB is responsible
obtained from a pre-trained ResShift model. By iteratively             for extracting information from the full-precision activation
sampling from the reformulated process in Eq. 3, a deter-              stream for computation and generation.
ministic multi-steps mapping process between xT (or ϵ) and
x̂0 can be obtained, which is denoted as Fθ (xT , y).                  B.2. Frequency-Domain Analysis of Three Branches

A.2. Distillation                                                      Frequency-domain analysis is crucial for understanding the
                                                                       roles of different layers, especially in super-resolution tasks.
Following SinSR(Wang et al., 2024), we utilize a student               In this context, low-frequency information corresponds to
network fˆθ to learn the deterministic mapping Fθ between              the low-resolution image, while the primary goal of SR is to
the randomly initialized state xT and its deterministic output         generate appropriate high-frequency details. By analyzing
Fθ (xT , y) from a teacher diffusion model. The distillation           different frequency components, we can better interpret how
loss is defined as:                                                    each branch contributes to the reconstruction process.

        Ldistill = LM SE (fˆθ (xT , y, T ), Fθ (xT , y)).    (5)       The high and low-frequency proportions are computed by
  *
                                                                       first summing the activations from BMB, LRMB, and SMB
   Equal contribution 1 Shanghai Jiao Tong University 2 South          to obtain the total activation. A 2D Fast Fourier Transform
China University of Technology 3 Huawei Noah’s Ark Lab. Corre-
spondence to: Linghe Kong <linghe.kong@sjtu.edu.cn>, Yulun             (FFT) is applied, and the frequency components are shifted
Zhang <yulun100@gmail.com>.                                            to center the low-frequency region. A binary mask is then
                                                                       used, where the central 14 region represents low frequencies,

                                                                   1
𝑘 = max(𝐶𝑖𝑛 , 𝐶𝑜𝑢𝑡 )                                    𝑘 = 2max(𝐶𝑖𝑛 , 𝐶𝑜𝑢𝑡 )




𝑘 = 3max(𝐶𝑖𝑛 , 𝐶𝑜𝑢𝑡 )                                   𝑘 = 4max(𝐶𝑖𝑛 , 𝐶𝑜𝑢𝑡 )

              Figure 1:𝑟rmax
                         r
                             of LRMB and SMB. rmax = max(Cin , Cout ) .
                               𝑜𝑓 𝐿𝑅𝑀𝐵 𝑎𝑛𝑑 𝑆𝑀𝐵
                        𝑟𝑚𝑎𝑥




                                         2
and the surrounding 34 represents high frequencies. The               design, we adopt a uniform configuration across all layers,
proportion is determined by summing the spectral energy               which may limit the model’s ability to fully exploit these
within each region, providing insight into the frequency              layer-specific characteristics. Determining critical hyperpa-
contributions of different branches.                                  rameters, such as the rank r in LRMB and the number of
                                                                      selected elements k in SMB, remains a challenging task due
As illustrated in Fig 2, the contributions of the three
                                                                      to the large search space. Moreover, our binarization ap-
branches vary across different layer types and frequency
                                                                      proach has not yet been evaluated on larger-scale pre-trained
components. From the perspective of layer types, BMB
                                                                      diffusion models, and the proposed method has not been
exhibits a significantly higher contribution in convolutional
                                                                      tested on hardware for practical deployment.
layers, regardless of low- or high-frequency components.
This aligns with prior studies indicating that convolutional
layers are inherently more quantization-friendly. In con-             E.2. Future Work
volutional layers, BMB alone accounts for the majority of             In future research, we will explore adaptive quantization
the contribution. In contrast, in MLP (linear) layers, our            strategies tailored to different layers to achieve more effi-
proposed auxiliary branches, LRMB and SMB, contribute a               cient compression. We also plan to extend our approach to
larger proportion of activations, suggesting their role in com-       larger-scale diffusion models and conduct comprehensive
pensating for the limitations of BMB in such layers. This             evaluations on hardware to assess its real-world applicability.
confirms that LRMB and SMB effectively address Issue I.
From the perspective of frequency components, BMB con-
sistently exhibits stronger contributions to high-frequency           References
components across both convolutional and MLP layers. This
                                                                      Wang, Y., Yang, W., Chen, X., Wang, Y., Guo, L., Chau,
indicates that BMB primarily functions as an information
                                                                       L.-P., Liu, Z., Qiao, Y., Kot, A. C., and Wen, B. Sinsr:
generator, producing high-frequency details. Meanwhile,
                                                                       diffusion-based image super-resolution in a single step.
LRMB and SMB primarily facilitate information delivery,
                                                                       In CVPR, 2024.
ensuring critical details are preserved and refined, particu-
larly when BMB alone struggles to maintain performance.               Yue, Z., Wang, J., and Loy, C. C. Resshift: Efficient diffu-
                                                                        sion model for image super-resolution by residual shifting.
C. Training Details                                                     NeurIPS, 2024.

C.1. Training Time
Our model, BiMaCoSR, requires only 20GB of VRAM to
train with a batch size of 8. The training time is provided in
Table 1a, conducted on one NVIDIA RTX A6000.

C.2. Training Curve Details
We provide training curve plots for the ablation experiments
in Fig 3, highlighting their potential applications. All exper-
iments were conducted for 100K steps, but some data was
lost, so partial trimming was applied.

D. Visual Results
We provide more visual comparison result in this section,
shown in Fig 4 and Fig 5. All results demonstrate the out-
standing performance of our proposed BiMaCoSR.

E. Limitations and Future Work
E.1. Limitation
Our model has the potential to implement layer-wise adap-
tive quantization strategies, leveraging the distinct charac-
teristics of different network layers. However, in the current


                                                                  3
Figure 2: Branch contributions in different frequency domains across layers. The figure show the proportion of contributions
from BMB, LRMB, and SMB in both high and low frequency components within convolutional and MLP layers.




                     Break down ablation                                   Ablation study on LRMB initialization




              Ablation study on the rank of LRMB                          Ablation study on SMB initialization




                 Figure 3: The details of the training curves for the ablation experiments in the main text.


                                                             4
                             Model          Num of Iters     s/Iters    Training Time
                             ResShift          500k           1.32s       7.64days
                             SinSR             30k            7.41s       2.57days
                             BiMaCoSR          100k           3.86s       4.47dyas
                                        (a) Training Time Comparison.




                                  HR                       SinSR                  ReSTE         BiDM




DIV2K-Val: 0823.png              BBCU                      XNOR                  ReactNet   BiMaCoSR (ours)




                                  HR                       SinSR                  ReSTE         BiDM




DIV2K-Val: 0847.png              BBCU                      XNOR                  ReactNet   BiMaCoSR (ours)




                                  HR                       SinSR                  ReSTE         BiDM




DIV2K-Val: 0852.png              BBCU                      XNOR                  ReactNet   BiMaCoSR (ours)




                                  HR                       SinSR                  ReSTE         BiDM




DIV2K-Val: 0853.png              BBCU                      XNOR                  ReactNet   BiMaCoSR (ours)




                                  HR                       SinSR                  ReSTE         BiDM




DIV2K-Val: 0855.png              BBCU                      XNOR                  ReactNet   BiMaCoSR (ours)
                      Figure 4: Visual comparison for image SR in some challenging cases.
                                                       5
                                       HR                      SinSR                 ReSTE           BiDM




  DIV2K-Val: 0860.png                 BBCU                     XNOR                 ReactNet     BiMaCoSR (ours)




                                       HR                      SinSR                 ReSTE           BiDM




  DIV2K-Val: 0885.png                 BBCU                     XNOR                 ReactNet     BiMaCoSR (ours)




                                       HR                      SinSR                 ReSTE           BiDM




 RealSR: Nikon 018.png                BBCU                     XNOR                 ReactNet     BiMaCoSR (ours)




                                       HR                      SinSR                 ReSTE           BiDM




 RealSR: Nikon 027.png                BBCU                     XNOR                 ReactNet     BiMaCoSR (ours)




                                       HR                      SinSR                 ReSTE           BiDM




DIV2K-Val: Nikon 031.png              BBCU                     XNOR                 ReactNet     BiMaCoSR (ours)
                           Figure 5: Visual comparison for image SR in some challenging cases.




                                                           6
