IntLoRA: Integral Low-rank Adaptation of Quantized Diffusion Models

## Abstract

Abstract Fine-tuning large-scale text-to-image diffusion models for various downstream tasks has yielded impressive results. However, the heavy computational burdens of tuning large models prevent personal customization. Recent advances have attempted to employ parameter-efficient fine-tuning (PEFT) techniques to adapt the floating-point ( FP ) or quantized pre-trained weights. Nonetheless, the adaptation parameters in existing works are still restricted to FP arithmetic, hindering hardware-friendly acceleration. In this work, we propose IntLoRA, to further push the efficiency limits by using integer type ( INT ) low-rank parameters to adapt the quantized diffusion models. By working in the integer arithmetic, our IntLoRA offers three key advantages: (i) for fine-tuning, the pre-trained weights are quantized, reducing memory usage; (ii) for storage, both pre-trained and low-rank weights are in INT which consumes less disk space; (iii) for inference, IntLoRA weights can be naturally merged into quantized pre-trained weights through efficient integer multiplication or bit-shifting, eliminating additional post-training quantization. Extensive experiments demonstrate that IntLoRA can achieve performance on par with or even superior to the vanilla LoRA, accompanied by significant efficiency improvements. Code is available at https://github.com/csguoh/IntLoRA .

## 1 Introduction

Recently, large-scale text-to-image (T2I) diffusion models (Ramesh et al., ; Rombach et al., ; Saharia et al., ; Podell et al., ) have shown promising capabilities for image generation. Taking advantage of the strong generative prior of pre-trained parameters, a range of downstream adaptation applications have emerged, including subject-driven generation (Ruiz et al., ), style-customized generation (Sohn et al., ), and controllable generation (Zhang et al., ). However, fully fine-tuning these large models for personalized customization poses challenges on consumer-level GPUs, as well as the costs of storing the weight for each downstream task.

To facilitate efficient adaptation, recent advances (Qiu et al., ; Liu et al., ) have introduced parameter efficient fine-tuning (PEFT) (Hu et al., ; Houlsby et al., ; Jia et al., ) that focuses on fine-tuning a limited number of parameters for downstream tasks. Despite the reduction in trainable parameters, current PEFT methods predominantly rely on floating-point (FP) arithmetic, which can be inefficient for practical applications. For instance, using large FP pre-trained weights during fine-tuning can result in significant GPU memory overhead. Additionally, both the pre-trained weights and the adaptation parameters remain in FP format, consuming substantial disk space. Although some PEFT methods propose weight merging techniques to mitigate the extra inference cost associated with the adaptation parameters, they still fall short in obtaining reduced latency beyond the pre-trained large models.

On the other hand, neural network quantization (Nagel et al., ; ; Esser et al., ), which can transform the trained FP parameters into low-bit integer (INT) representations, is a prominent technique for accelerating deep learning models.
Thus, integrating PEFT with quantization techniques holds promise for enhancing the efficiency of downstream adaptations.
To this end, some pioneer works (Dettmers et al., ; Qin et al., ) attempt downstream adaptation by directly fine-tuning the quantized INT pre-trained weights with FP PEFT parameters. However, it remains an open challenge for quantization-aware adaptation. Specifically, since the adaptation weights are still in FP, it is inevitable to convert the quantized pre-trained weights back to FP for arithmetic consistency for subsequent weight merge. As a result, it necessitates additional post-training quantization (PTQ) to quantize the merged weights for practical employment, which is pipeline-complicated and incurs a performance drop when the bit-width is low (see Fig. 1).

To some extent, the primary technical bottleneck in bridging PEFT and quantization arises from the arithmetic inconsistency between the quantized pre-trained weights and the adaptation weights. Specifically, the FP adaptation weights necessities the conversion of the quantized pre-training weights from INT to FP for the subsequent weight fusion. To address this inconsistency, a potential solution is to also transfer the adaptation weights to integer arithmetic. In this way, all weights during fine-tuning are quantized, allowing to store only INT weights, as well as convenient weight merging during inference. Despite these promising properties, it is non-trivial to accurately quantize the adaptation weights for satisfactory performance. For example, while zero initializing low-rank weights are advantageous for fine-tuning (Hu et al., ), it poses quantization challenges due to substantial quantization errors from small values. Furthermore, the additive form of the original LoRA forces the pre-trained and adaptation weights to share the same quantizer for subsequent weight merging, which restricts the available parameter space for adaptation.

Figure: Figure 1: Left: (a) The arithmetic inconsistency between the pre-trained and adaptation weights results in the merged weights still in FP. Consequently, additional PTQ is needed for low-bit inference. (b) Our approach allows PEFT to operate directly on INT arithmetic, ensuring the merged weights seamlessly in INT format and streamlining the whole process. Right: The utilization of PTQ on the downstream adapted weights leads to severe performance degradation under low bit-width quantization, which makes the tuning-then-quantization paradigm less general.
Refer to caption: x1.png

To address the above challenges, we propose IntLoRA, which employs INT low-rank parameters to adapt the quantized diffusion models. In detail, we introduce the Adaptation-Quantization Separation (AQS) technique, which employs a task-agnostic auxiliary matrix to enable quantization-friendly low-rank parameters without disrupting the gradient trajectory of the original LoRA. Additionally, we present the Multiplicative Low-rank Adaptation (MLA), which reformulates the mathematical structure of LoRA from addition to multiplication. This remains mathematically equivalent to the original but allows for independent optimization of adaptation weights, eliminating the need to share the same quantizer as the pre-trained weights. Furthermore, we develop the Variance Matching Control (VMC) mechanism that aligns variances of the pre-trained and auxiliary matrices, controlling the adaptation distribution for more efficient log2-quantization. For implementation, we provide two versions of IntLoRA, i.e., IntLoRAMUL, and IntLoRASHIFT. The IntLoRAMUL learns quantized low-rank parameters and can be seamlessly merged with quantized pre-trained weight through integer multiplication, while IntLoRASHIFT introduces log2-quantization and operates by bit-shifting the quantized pre-trained weights for downstream adaptation. We evaluate our IntLoRA on prevalent T2I adaptation tasks, including subject-driven generation (Ruiz et al., ), style-customized generation (Sohn et al., ) and controllable generation (Zhang et al., ). Extensive experiments demonstrate that IntLoRA represents a novel diffusion fine-tuning paradigm with impressive efficiency and favorable performance.

The contribution of this work can be summarized as follows:
(i) we introduce IntLoRA, which achieves integer PEFT to address the arithmetic inconsistency, thereby advancing the efficiency of diffusion model adaptations;
(ii) we propose the adaptation-quantization separation to facilitate quantization-friendly pre-trained weights, and further develop the multiplicative low-rank adaptation for independent quantizers, complemented by variance matching control for effective distribution manipulation;
(iii) our IntLoRA enables the adaptation of quantized diffusion models through hardware-friendly integer multiplication or bit-shifting, resulting in significant efficiency gains in fine-tuning, storage, and inference. Extensive experiments validate the superiority of our method.

## 2 Related Work

#### Parameter-efficient fine-tuning of diffusion models.

In order to reduce the fine-tuning cost of large models, parameter-efficient fine-tuning (PEFT) has recently gained great interests (Lian et al., ; Chavan et al., ; Li & Liang, ; He et al., ; Jie & Deng, ). For example, some pioneering work (Zaken et al., ) proposes to fine-tune only a fraction of the pre-trained weights. To achieve better performance, prompt-based methods (Jia et al., ) append learnable prompts to modify the input space. Adapter-based methods (Houlsby et al., ; Chen et al., ) employ additional bottleneck structures as bypass branches for adaptation. LoRA (Hu et al., ), which adopts low-rank matrices to learn weight updates for downstream tasks, has become a popular pipeline for diffusion model adaptation. Moreover, OFT (Qiu et al., ) uses orthogonal constraints to preserve the pairwise angles between neuron vectors to maintain the hypersphere energy. COFT (Liu et al., ) further uses butterfly factorization to formulate denser orthogonal matrices using fewer parameters. In this work, we mainly focus on LoRA since it has been widely applied and can be merged into pre-trained weights without increasing the inference cost.

#### Network quantization of diffusion models.

Quantization (Nagel et al., ) is an effective technique to reduce model storage and inference costs, and can be categorized into quantization-aware training (QAT) (Jacob et al., ; Li et al., ; ; Xu et al., ) and post-training quantization (PTQ) (Wang et al., ; Nahshan et al., ; Li et al., ; Wei et al., ; Liu et al., ; Huang et al., ). In the context of diffusion model quantization, existing works mainly focus on PTQ because of the significant overhead of retraining diffusion models. For example, PTQ4DM (Shang et al., ) makes the first attempt to quantize diffusion models to 8 bits. After that, Q-Diffusion (Li et al., ) further achieves improved performance and lower bit-width. In addition, PTQD (He et al., ) eliminates quantization noise through correlated and residual noise correction. EfficientDM (He et al., ) introduces LoRA to fine-tune the pre-trained model to allow comparable performance with QAT. TFMQ-DM (Huang et al., ) observes the impact of quantization errors on the time-step representation and proposes to quantize the time-embedding layer individually for better performance. However, the network quantization only enables efficient inference at low bit-widths on the original task, failing to handle various downstream tasks.

#### Joint adaptation and quantization.

The work aims to achieve both parameter-efficient adaptations as well as storage and inference-efficient quantization, to further push the efficiency limits of diffusion model fine-tuning. However, this also poses additional challenges, such as back-propagating gradients in quantized values and optimizing the learnable parameters with quantization restrains. Existing related works have explored mainly LLMs, but it is still far from a satisfactory solution. Specifically, QLoRA (Dettmers et al., ) proposes to quantize the LLMs before fine-tuning the LLMs with LoRA. Despite the reduced GPU usage during training due to the import of only the quantized model, QLoRA does not maintain quantized at inference since the quantized weights need to be converted to FP again so that to add the LoRA weights. To solve this problem, QA-LoRA (Xu et al., ) develops a group-wise quantization through sharing parameters across channels, but at the cost of impairing the adaptation ability as well as the need to store FP LoRA weights. IR-QLoRA (Qin et al., ) analyzes the entropy loss of quantization from an information theory view, but it also needs to convert the quantized weights back to FP during inference.

## 3 Preliminary

The main idea of low-rank adaptation (LoRA)  (Hu et al., ) comes from the fact that the learned incremental matrix during downstream adaptation usually possesses low-rank properties. To this end, LoRA introduces a low-rank matrix $\Delta\mathbf{W}$ to learn the weight increments for adapting the pre-trained weights $\mathbf{W}\in\mathbb{R}^{C_{out}\times C_{in}}$ to downstream tasks. In implementation, the $\Delta\mathbf{W}$ is formulated as the matrix multiplication of two low-rank matrices $\mathbf{A}\in\mathbb{R}^{C_{out}\times d}$ and $\mathbf{B}\in\mathbb{R}^{d\times C_{out}}$, where the inner dimension $d$ is the pre-defined rank. During fine-tuning, the pre-trained weight $\mathbf{W}$ is frozen and only $\mathbf{A},\mathbf{B}$ is trainable. Since $d\ll\min\{C_{in},C_{out}\}$, the number of trainable parameters can be very small compared to full fine-tuning. The output during the downstream fine-tuning is calculated as $\mathbf{y}=\mathbf{W}\mathbf{x}+\lambda\cdot(\mathbf{A}\mathbf{B})\mathbf{x}$, where $\lambda$ is the LoRA scale to adjust the control strength. During inference, the task-specific $\mathbf{AB}$ can be naturally merged into the pre-trained weights, i.e., $\mathbf{W^{\prime}}=\mathbf{W}+\lambda\cdot\mathbf{A}\mathbf{B}$, without increasing additional computational cost.

Even though the PEFT techniques can alleviate training costs, they still struggle to reduce the inference latency. To allow for accelerated inference, network quantization is a common practice that converts the FP weights to hardware-efficient low-bit INT integers. Formally, given a FP tensor $\mathbf{X}$, the target bit-width $b$, the quantization process can be defined as:

$$ $\hat{\mathbf{X}}=s\cdot(\text{clip}(\lfloor\frac{\mathbf{X}}{s}\rceil+z,0,2^{b }-1)-z)\triangleq s\cdot(\mathbf{X}_{\mathrm{round}}-z),$ (1) $$

where $\lfloor\cdot\rceil$ is the $\mathrm{round}$ function, $s=\frac{\max(\mathbf{X})-\min(\mathbf{X})}{2^{b}-1}$ is the scaling factor, and $z=-\lfloor\frac{\min(\mathbf{X})}{s}\rceil$ is the zero-point.
In short, PEFT and quantization can facilitate efficient training and inference, respectively, and thus integrating both into one system holds great potential for further acceleration.

## 4 Methodology

### 4.1 Bridging Efficient-adaptation and Quantization

Although parameter-efficient adaptation and network quantization each contribute to improved fine-tuning and inference efficiency, it remains an unexplored challenge to effectively combine them. Existing work such as QLoRA (Dettmers et al., ) employs the low-rank $\mathbf{AB}$ to fine-tune quantized weights $\hat{\mathbf{W}}$ to reduce the memory footprint of loading a full-precision model. After training, merging the low-rank FP parameters and quantized INT weights results in the adapted weights $\mathbf{W^{\prime}}$ which is reverted to FP again. Consequently, additional PTQ on $\mathbf{W^{\prime}}$ is needed for inference efficiency. When the bit width is low, e.g., 4-bit, this PTQ can significantly degrade performance.

In this work, we attribute the main difficulty in effectively marrying PEFT and quantization to arithmetic inconsistency. Specifically, the FP $\mathbf{AB}$ forces the quantized INT $\hat{\mathbf{W}}$ to revert to FP during weight merging. To bridge the arithmetic gap, a feasible solution is to convert the low-rank parameters to integer form $\hat{\mathbf{AB}}$. In this way, the same typed $\hat{\mathbf{W}}$ and $\hat{\mathbf{AB}}$ can be seamlessly merged during inference without additional PTQ.
However, several technical challenges arise when performing PEFT on integer arithmetic. First, the $\mathbf{AB}$ in the original LoRA is zero-initialized to preserve the knowledge of the pre-trained weights. Although helpful for fine-tuning, this initialization complicates the quantization process. For instance, the all-zero distribution requires a separately designed quantizer at the beginning of tuning. In addition, quantizing small values also produces large relative errors, leading to inaccurate gradient optimization. Second, the vanilla LoRA merges the FP $\mathbf{AB}$ and $\mathbf{W}$ using addition. When both $\mathbf{AB}$ and $\mathbf{W}$ are quantized, it is essential to ensure that they share identical quantization parameters to enable PTQ-free weight merging. This constraint restricts the feasible parameter space, thus limiting the adaptation ability.

Figure: Figure 2: The overall adaptation pipeline of our proposed IntLoRA.
Refer to caption: x2.png

### 4.2 Integral Low-rank Adaptation

To address the aforementioned challenges, we propose the integral low-rank adaption, dubbed IntLoRA, which enables PEFT in integer arithmetic. Given that backpropagation with INT types can severely impair performance, we mainly consider simulated quantization during fine-tuning, while keeping the standard INT format for storage and inference purposes. In addition, for simplicity, this work focuses solely on weight quantization. The overall pipeline of our IntLoRA is shown in Fig. 2.
We first propose the Adaptation-Quantization Separation (AQS) to process the low-rank parameters, thus avoiding direct quantization on the zero-initialized $\mathbf{AB}$. Then we develop the Variance Matching Control (VMC) to adjust the distribution of the adaptation weights, followed by the uniform quantizer or log2 quantizer to obtain the quantized adaptation weights. At last, we introduce the Multiplicative Low-rank Adaptation (MLA) to adapt quantized pre-trained weights by either int-multiplication or bit-shifting, enabling independent quantizer of adaptation and pre-trained weights. More details are given below.

Adaptation-quantization separation.
The vanilla LoRA adopts zero initialization on $\mathbf{AB}$ to ensure the behavior of the model is similar to the pre-trained one at the beginning of training (Hu et al., ). Although this initialization can improve performance, the all-zero distribution is not quantization-friendly, as validated in  Sec. 4.1 and  Sec. 5.3. To allow accurate quantization while maintaining the correct gradient, we propose the Adaptation-Quantization-Separation (AQS) strategy. The key observation is that
the adaptation requires gradients from zero-initialized weights while the quantization does not. Therefore, we can split the non-zero initialized adaptation weights into the gradient-aware zero part and the gradient-free nonzero part. Formally, let $\mathbf{R}$ be the non-zero auxiliary matrix, $\mathcal{Q}$ be the quant-dequant operator, then our AQS can be formulated as:

$$ $\mathbf{W^{\prime}}=\mathcal{Q}[\mathbf{W}-\mathrm{sg}(\mathbf{R})]+\mathrm{sg }(\mathbf{R})+\mathbf{AB},$ (2) $$

where $\mathrm{sg}(\cdot)$ denotes the stop gradient operation. Thanks to the AQS, the $\mathbf{AB}$ can be zero-initialized for the same gradient as the original LoRA, while $\mathrm{sg}({\mathbf{R}})+\mathbf{AB}$ facilitate subsequent quantization by choosing the auxiliary matrix $\mathbf{R}$. In the following part, we will ignore the $\mathrm{sg}(\cdot)$ notation for clarity.

Multiplicative low-rank adaptation.
The vanilla LoRA employs additive form $\mathbf{W}+\mathbf{AB}$ for weight merge. However, it is difficult to seamlessly fuse the quantized $\hat{\mathbf{W}}$ and $\hat{\mathbf{AB}}$ when they are quantized by independent quantizers. To this end, we propose Multiplicative Low-rank Adaptation (MLA) to rewrite the form of the original LoRA into a quantization-friendly multiplication form. Specifically, denote the quant-dequant results as $\mathcal{Q}(\mathbf{W}-\mathbf{R})=s\cdot(\mathbf{W}_{\mathrm{round}}-z)$, then the MLA can be derived as follows:

$$ $\displaystyle\mathbf{W^{\prime}}$ $\displaystyle=\mathcal{Q}(\mathbf{W}-\mathbf{R})+\mathbf{R}+\mathbf{AB}$ (3) $\displaystyle=s\cdot(\mathbf{W}_{\mathrm{round}}-z)+\mathbf{R}+\mathbf{AB}$ $\displaystyle={\color[rgb]{0.75390625,0,0}\definecolor[named]{pgfstrokecolor}{ rgb}{0.75390625,0,0}[s\cdot\mathbf{I}+\frac{1}{\mathbf{W}_{\mathrm{round}}-z} \odot(\mathbf{R+AB})]}\odot{\color[rgb]{0,0,0.75390625}\definecolor[named]{ pgfstrokecolor}{rgb}{0,0,0.75390625}(\mathbf{W}_{\mathrm{round}}-z)},$ $$

where the task-specific adaptation term is trainable and will be quantized, and the pre-trained term is already in INT and is shared across tasks. $\mathbf{I}$ is an all-one matrix. The operator $\odot$ denotes the Hadamard product of two matrices. The proposed MLA is mathematically equivalent to its additive counterpart, while is more quantization-friendly since it avoids the shared quantizer of pre-trained and adaptation weights. It is noteworthy that the adaptation term is still in FP, and we will detail its quantization strategies in Sec. 4.3.

Variance matching control.
One opportunity brought from the multiplicative form in Eq. 3 is that we can apply the log2-quantization on the adaptation term, thus allowing hardware-efficient bit-shifting on the pre-trained term for adaptation. However, log2-quantization is usually more difficult than common uniform quantization (Nagel et al., ) and requires appropriate distribution properties, e.g., most values concentrated around zero to allow for the utilization of as many quantization bins as possible on the logarithmic scale. Here, we revisit the adaptation term in Eq. 3 aiming to find useful mathematical insights. Since the $\mathbf{AB}$ is orders of magnitude smaller than $\mathbf{R}$, we analyze and approximate the adaptation term in Eq. 3 by removing $\mathbf{AB}$ from it, namely,

$$ $\displaystyle s\cdot\mathbf{I}+\frac{\mathbf{R}}{\mathbf{W}_{\mathrm{round}}-z }=s\cdot\mathbf{I}+\frac{s\cdot\mathbf{R}}{s\cdot(\mathbf{W}_{\mathrm{round}}- z)}\approx s\cdot\mathbf{I}+\frac{s\cdot\mathbf{R}}{\mathbf{W-R}}=\frac{s\cdot \mathbf{W}}{\mathbf{W}-\mathbf{R}}.$ (4) $$

From this derivation, it follows that the auxiliary matrix $\mathbf{R}$ is crucial for controlling the distribution of the adaptation term. However, there exists a dilemma in choosing an appropriate distribution for $\mathbf{R}$. On the one hand, it is desirable for the values in $\mathbf{R}$ to be larger (which are controlled by the variance of $\mathbf{R}$) as it leads to a zero-mean adaptation term, namely,

$$ $\mathbb{E}\left[\lim_{\sigma_{\mathbf{R}}\to\infty}(s\cdot\mathbf{I}+\frac{ \mathbf{R}}{\mathbf{W}_{\mathrm{round}}-z})\right]=\mathbb{E}\left[\lim_{ \sigma_{\mathbf{R}}\to\infty}\frac{s\cdot\mathbf{W}}{\mathbf{W}-\mathbf{R}} \right]=0,$ (5) $$

where $\sigma_{\mathbf{R}}$ is the standard deviation of $\mathbf{R}$.
On the other hand, large values in $\mathbf{R}$ can also make the term-to-be-quantized $\mathbf{W-R}$ uncorrelated to the useful $\mathbf{W}$, namely,

$$ $\lim_{\sigma_{\mathbf{R}}\to\infty}\rho(\mathbf{W}-\mathbf{R},\mathbf{W})=\lim _{\sigma_{R}\to\infty}\frac{\sigma_{\mathbf{W}}}{\sqrt{\sigma_{\mathbf{W}}^{2} +\sigma_{\mathbf{R}}^{2}}}=0,$ (6) $$

which results in significantly lossy reconstruction of $\mathbf{W}$ from the $\mathbf{W-R}$ using the estimator $\mathbf{W}\approx\mathcal{Q}(\mathbf{W-R})+\mathbf{R}$. Thus, values with smaller ranges in $\mathbf{R}$ and a smaller variance of $\mathbf{R}$ are expected. We give the visualization evidence of this choice dilemma of $\sigma_{\mathbf{R}}$ in Fig. 6. Due to the contradictory aspects of the desired properties of the distribution of $\mathbf{R}$, it becomes non-trivial to select a proper variance for $\mathbf{R}$.
To this end, we propose the Variance Matching Control (VMC) mechanism to adjust the distribution of $\mathbf{R}$.
Specifically, we first multiply $\mathbf{R}$ by the variance ratio $r=\frac{\sigma_{\mathbf{W}}}{\sigma_{\mathbf{R}}}\in\mathbb{R}^{C_{out}}$ for rough alignment from $\mathbf{R}$ to the scale of $\mathbf{W}$. After that, we further introduce a scalar $\alpha$ as an exponent of $r$, i.e., $r^{\alpha}$, to fine-grain the search for the optimal $\mathbf{R}^{*}$. As a result, the variance-matched auxiliary matrix can be denoted as $\mathbf{R}^{*}=r^{\alpha}\cdot\mathbf{R}$, and we can use this to control the distribution suitable for log2-quantization. Since $r^{\alpha}$ can be shared across tasks, it is only of negligible cost. At last, it is worth noting that in addition to the $\sigma_{\mathbf{R}}$, the shape of the distribution of $\mathbf{R}$ also has an effect on performance, and we give detailed discussion in Sec. 5.3.

### 4.3 Implementation of IntLoRA

Benefiting from the quantization-friendly weight distribution produced from the variance matching control, we provide two variants of our IntLoRA according to different quantizers on the adaptation term. The first variant employs the uniform quantizer on the adaptation term, thus enabling direct weight merge between the quantized adaptation term and pre-trained weights through integer multiplication. The second variant introduces log2 quantization to achieve downstream adaptation by bit-shifting the quantized pre-trained weights. More details are given below.

Integer multiplication form.
We employ uniform affine quantization on the adaptation term, with the scaling factor and zero-point denoted as $\bar{s}$ and $\bar{z}$, and the quantized results as $\mathbf{U}_{\mathrm{round}}$, then our IntLoRAMUL can be formalized as:

$$ $\mathbf{W^{\prime}}=\bar{s}\cdot(\mathbf{U}_{\mathrm{round}}-\bar{z})\odot( \mathbf{W}_{\mathrm{round}}-z).$ (7) $$

Bit-shifting form.
Denote the adaptation term in Eq. 3 as $\mathbf{V}$ for clarity, we first compute the bit shift value as follows:

$$ $\mathrm{shift}=\text{clip}(\lfloor-\log_{2}|\mathbf{V}|\rceil,0,2^{b}-1).$ (8) $$

Then the weight adaptation with IntLoRASHIFT can be represented as:

$$ $\displaystyle\mathbf{W^{\prime}}$ $\displaystyle=\operatorname{sign}(\mathbf{V})\odot 2^{-\mathrm{shift}}\odot( \mathbf{W}_{\mathrm{round}}-z)$ (9) $\displaystyle=\operatorname{sign}(\mathbf{V})\odot[(\mathbf{W}_{\mathrm{round} }-z)\gg\mathrm{shift}]$ $\displaystyle=\frac{1}{2^{N}}\odot\operatorname{sign}(\mathbf{V})\odot[( \mathbf{W}_{\mathrm{round}}-z)\ll(N-\mathrm{shift})]$ $$

where $\operatorname{sign}(\mathbf{V})\in\{-1,1\}$ and $N=2^{b}-1$. Since the direct right-shifting on $\mathbf{W}_{\mathrm{round}}-z$ may lead to truncation error, we thus use $N-\mathrm{shift}$ with a scaling factor $\frac{1}{2^{N}}$ to equivalently convert to the left-shifting for error reduction.

## 5 Experiments

### 5.1 Experimental Setup

Baselines.
Since there is little work studying PEFT of quantized diffusion models in integer arithmetic, we reproduce existing related approaches in LLMs and compare them with the proposed IntLoRA. Specifically, we include the following baselines: i) QLoRA (Dettmers et al., ), which fine-tunes the quantized model using FP low-rank matrix. Since the adapted weights are still in FP, we thus apply additional PTQ on the merged weights for a fair comparison. ii) QA-LoRA (Xu et al., ), which uses group-shared low-rank parameters for seamless weight merge, and iii) IR-QLoRA (Qin et al., ), which improves the quantization with information retention as well as information elastic connection, and we also use additional PTQ on the merged FP weights.

Downstream tasks.
We evaluate different methods on multiple adaptation tasks, including subject-driven generation (Ruiz et al., ), controllable generation (Zhang et al., ), and style-customized image generation (Sohn et al., ). The subject-driven generation aims to generate images of the same subject given several images of a specific subject and a text prompt. We use the dataset released by Dreambooth (Ruiz et al., ) for training and testing, which contains 25 subjects with each subject corresponding to 30 prompts. For controllable generation, we consider three sub-tasks, i.e, segmentation map to image on ADE20K dataset (Zhou et al., ), face landmark to image on CelebA-HQ dataset (Karras, ), and the canny edge to image on the COCO dataset (Lin et al., ). For the style-customized generation, we employ the StyleDrop (Sohn et al., ) dataset, which includes 18 style images, and we use 6 text prompts for each style to generate images with style similar to the style image and content aligned with the text prompt.

Evaluation metrics.
In the subject-driven generation, we evaluate the quality of the generated images from three crucial aspects, i.e., we use the DINO (Caron et al., ), CLIP-I (Radford et al., ) to access the subject fidelity, the CLIP-T (Radford et al., ) for textual prompt content fidelity, and LPIPS (Zhang et al., ) for sample diversity. For controllable generation task, we adopt both referenced and non-referenced image quality assessment metrics, namely FID (Heusel et al., ), CLIPIQA (Wang et al., ), and NIQE (Mittal et al., ) to evaluate the performance of different methods. For style-customized generation, following StyleDrop (Sohn et al., ), we use CLIP-I to access the similarity between style images and generated images and use CLIP-T to evaluate the semantic fidelity between generated results and text prompts. However, as mentioned in StyleDrop (Sohn et al., ), these two scores are still not a perfect metric for performance evaluation, since even simply copying the style image as the generated results can also obtain a high CLIP-I score. To this end, we further adopt the ratio $\frac{\rm CLIP-I}{\rm CLIP-T}$ to comprehensively evaluate the balance between style and content fidelity.

**Table 1: Quantitative comparison on subject-driven generation tasks. We mark the proposed method with a gray background. The best results are bolded.**
| Method | 8bit-bitwidth | 4bit-bitwidth |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| DINO$\uparrow$ | CLIP-I$\uparrow$ | CLIP-T$\uparrow$ | LPIPS$\downarrow$ | DINO$\uparrow$ | CLIP-I$\uparrow$ | CLIP-T$\uparrow$ | LPIPS$\downarrow$ |  |
| LoRA-FP | 0.3625 | 0.7431 | 0.2499 | 0.7707 | 0.5625 | 0.7431 | 0.2499 | 0.7707 |
| QLoRA | 0.3635 | 0.6542 | 0.2550 | 0.7959 | 0.1564 | 0.5797 | 0.2260 | 0.7824 |
| QA-LoRA | 0.3635 | 0.6555 | 0.2537 | 0.7952 | 0.3412 | 0.6504 | 0.2514 | 0.7950 |
| IR-QLoRA | 0.3599 | 0.6547 | 0.2542 | 0.7960 | 0.2289 | 0.5907 | 0.2307 | 0.7829 |
| IntLoRAMUL | 0.3929 | 0.6721 | 0.2551 | 0.7928 | 0.3479 | 0.6546 | 0.2494 | 0.7997 |
| IntLoRASHIFT | 0.3825 | 0.6641 | 0.2548 | 0.7930 | 0.3462 | 0.6478 | 0.2458 | 0.7970 |

Figure: Figure 3: Quantitative comparison on subject-driven generation tasks. More results are provided in Fig. 13. Zoom in for better effects.
Refer to caption: x3.png

Implementation details.
We employ the StableDiffusionV1.5 (Rombach et al., ) as the pre-trained backbone for subject-driven generation and controllable generation. We further employ larger SDXL (Podell et al., ) as the pre-trained model in the style-customized generation. We use prevalent uniform affine quantization (Nagel et al., ) to quantize the pre-trained model weights. We append the trainable low-rank parameters on the Query, Key, Value, and Out projection in the attention layers (Vaswani et al., ) and keep all other layers frozen and quantized. The rank of LoRA is set to 4 for subject-driven generation and controllable generation, and 64 for style-customized generation. For compared baselines, we control the rank to ensure a fair comparison. As for the variance matching control, we employ the ratio of the maxima of the sampled distributions as a fast estimator of the variance ratio. As for the training of the quantized adaptation term, we use the Straight Through Estimator (STE) on the quantized adaptation term to allow backpropagation. Due to the page limit, we provide more details in Appendix D.

**Table 2: Quantitative comparison on controllable image generation tasks.**
|  |  | Segmentation-to-Image | Landmark-to-Face | Canny-to-Image |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method | #Bits | FID$\downarrow$ | CLIPIQA$\uparrow$ | NIQE$\downarrow$ | FID$\downarrow$ | CLIPIQA$\uparrow$ | NIQE$\downarrow$ | FID$\downarrow$ | CLIPIQA$\uparrow$ | NIQE$\downarrow$ |
| LoRA | FP | 31.39 | 0.5710 | 4.45 | 37.50 | 0.5645 | 4.80 | 16.05 | 0.5582 | 5.37 |
| QLoRA | 8bit | 31.09 | 0.5669 | 4.44 | 35.73 | 0.5639 | 5.77 | 15.68 | 0.5901 | 5.16 |
| QA-LoRA | 8bit | 31.32 | 0.5755 | 4.17 | 38.88 | 0.5667 | 5.56 | 15.34 | 0.6001 | 5.32 |
| IR-QLoRA | 8bit | 31.81 | 0.5761 | 4.30 | 36.30 | 0.5683 | 5.74 | 15.70 | 0.6005 | 4.72 |
| IntLoRAMUL | 8bit | 31.09 | 0.5746 | 4.47 | 37.98 | 0.5681 | 6.51 | 16.16 | 0.5882 | 5.24 |
| IntLoRASHIFT | 8bit | 31.38 | 0.5703 | 4.22 | 34.46 | 0.5495 | 5.19 | 15.76 | 0.5913 | 4.83 |
| QLoRA | 4bit | 71.75 | 0.5584 | 4.61 | 117.37 | 0.5578 | 4.84 | 62.49 | 0.5728 | 4.70 |
| QA-LoRA | 4bit | 31.51 | 0.5646 | 4.31 | 43.09 | 0.5748 | 5.00 | 16.73 | 0.5745 | 4.52 |
| IR-QLoRA | 4bit | 35.83 | 0.5624 | 4.57 | 39.63 | 0.5632 | 5.23 | 18.30 | 0.5733 | 4.58 |
| IntLoRAMUL | 4bit | 30.87 | 0.5704 | 4.24 | 33.62 | 0.5667 | 4.55 | 17.58 | 0.5922 | 4.27 |
| IntLoRASHIFT | 4bit | 32.85 | 0.5693 | 4.57 | 35.06 | 0.5524 | 5.13 | 17.90 | 0.5907 | 4.89 |

Figure: Figure 4: Quantitative comparison on controllable generation tasks. More results are provided in Appendix H. Zoom in for better effects.
Refer to caption: x4.png

### 5.2 Main Results and Efficiency

Subject driven generation.
We first use our IntLoRA to fine-tune the pre-trained models on the subject-driven generation task. This task requires a few optimization steps for fine-tuning, and the downstream weights do not deviate too much from the pre-trained capabilities. Therefore, it can reflect the short-term tuning ability of different methods. Tab. 1 shows the results under 8-bit and 4-bit weight quantization settings. It can be seen that the proposed methods consistently outperform other competitors under different bit-width stetting. For instance, the IntLoRAMUL suppresses the IR-QLoRA by 0.1190 DINO score on the 4-bit setup. Notably, the QLoRA and IR-QLoRA baseline uses additional PTQ on the fine-tuned model, leading to a significant performance drop under the 4-bit width. In contrast, even the log2-quantization of our IntLoRASHIFT works well under 4-bit thanks to the proposed VMC. We also give qualitative visualization in Fig. 3, where one can see that our IntLoRA can facilitate subject-faithful and photo-realistic image generation.

Controllable image generation.
We further validate the effectiveness of IntLoRA on the controllable image generation. Since this task requires more tuning steps for adaptation in different input spaces from pre-training, it can represent the long-term adaptation ability. The results, shown in Tab. 2, indicate that our method achieves comparable results against existing strong baselines, e.g., our IntLoRAMUL outperforms the IR-QLoRA by 4.96 FID score on the 4-bit segmentation-to-image task. Fig. 4 provides the qualitative comparison, and it can be seen that the images generated by the IntLoRA-tuned model are well matched with the control signals.

Figure: Figure 5: Qualitative comparison on style-customized generation. Given the style image, we generate three images with different contents for each method. The corresponding text prompts are “A friendly robot in [V] style”, “A panda eating bamboo in [V] style”, and “The letter ‘G’ in [V] style”, respectively. ‘Ours’ denotes the IntLoRASHIFT. More results are provided in Fig. 17.
Refer to caption: x5.png

Style customized generation.
Tab. 3 shows the results of our IntLoRA compared with other baselines on the style customized generation task. Taking the ratio $\rm{\frac{CLIP-I}{CLIP-T}}$ of the LoRA-FP model as the metric reference, our method achieves a similar balance ratio of style and content as the LoRA-FP. In contrast, QA-LoRA and IR-QLoRA overfit to specific style images, reflecting excessively high CLIP-I and low CLIP-T. We also provide visualization results in Fig. 5. It can be seen that our IntLoRA achieves a favorable balance between style images and text prompts, whereas some existing approaches fail, e.g., the third row and fifth column with prompt “The letter ‘G’ in [V] style”, where the generated images almost copy the original style image.

The efficiency of IntLoRA.
Although the ultimate goal of all compared methods is the quantized diffusion models for fast inference, our IntLoRA can achieve this target with less cost. Specifically, as shown in Tab. 4, a clear advantage of our method lies in its seamless switch between tuning and inference, without additional PTQ. In addition, our IntLoRA is the only one that achieves INT type adaptation weights, significantly reducing the storage costs when there are many downstream tasks. Furthermore, our methods allow for weight merge using the hardware-friendly operator, naturally enabling the merged weights still in INT to facilitate the employment of edge devices.

Figure: Table 3: Quantitative comparison on style-customized image generation tasks. The $\mathrm{ratio}$ is $\frac{\mathrm{CLIP-I}}{\mathrm{CLIP-T}}$ to evaluate style-content balance.

### 5.3 Ablation Studies

In this section, we study the effectiveness of different components in the proposed IntLoRA. The experiments are conducted with IntLoRASHIFT on the subject-driven generation with 15 subject-prompt pairs under 4-bit weight quantization.

Contradictory aspect of auxiliary variances.
In Sec. 4.3, we have theoretically pointed out that there is a choice dilemma for $\sigma_{\mathbf{R}}$. Here we elaborate on its effect through distribution visualization. Specifically, we remove the VMC and use a scaling scalar to generate a too-large or too-small auxiliary variance, followed by the log2 quantization on the adaptation term. The results are shown in Fig. 6.
On the one hand, setting $\sigma_{\mathbf{R}}$ too large can lead to a low correlation $\rho(\mathbf{W},\mathbf{W-R})$, which makes it hard to reconstruct $\mathbf{W}$ from $\mathbf{W-R}$ using estimator $\mathbf{W}\approx\mathcal{Q}(\mathbf{W-R})+\mathbf{R}$. On the other hand, a too small $\sigma_{\mathbf{R}}$ prevents the expectation of adaptation term converging to zero, causing few log bins to be used. In experiments, we find that the training of both settings fails to converge. By contrast, the proposed VMC can precisely control $\sigma_{\mathbf{R}}$ to allow most values of the adaptation term to be zero-neighbored, facilitating more challenging log2 quantization. Moreover, it should be noted that the too small $\sigma_{\mathbf{R}}$ can also be regarded as an approximation of direct quantization on the zero-initialized $\mathbf{AB}$, and thus the experimental results also justify the AQS for zero-initialized $\mathbf{AB}$.

Figure: Table 5: Ablation on different distribution choices of the auxiliary matrix.

Distribution selection for auxiliary matrix.
In the proposed IntLoRA, the auxiliary matrix $\mathbf{R}$ plays a crucial role in both AQS and VMC. Therefore, the distribution shape of $\mathbf{R}$ can greatly influence the performance. To this end, we ablate different distributions as the instantiation of $\mathbf{R}$ and give the corresponding performances in  Tab. 5. It can be seen that the Laplace distribution performs better than the other options. This is because a light-tailed distribution, such as Laplace, clusters most samples around zero, which is consistent with the requirement for log2-quantization. And this accurate log2-quantization further facilitates favorable performance. Therefore, the light-tailed distribution performs experimentally better than the heavy-tailed counterparts. For better effects, we provide the shape of different distributions in  Fig. 12.

Figure: Figure 6: The distribution visualization using Kernel Density Estimate (KDE) on different weight tensors. Left: the KDE plot of pre-trained weights and estimated weights under different $\sigma_{\mathbf{R}}$. Right: the KDE plot of the adaptation term and the log2 bins usage with different $\sigma_{\mathbf{R}}$.
Refer to caption: x6.png

Figure: Figure 7: The normalized performance under different $\alpha$.
Refer to caption: x7.png

Ablation on the smoothing factor.
In order to produce quantization-friendly adaptation term, we propose the VMC which rescales $\sigma_{\mathbf{R}}$ by $r^{\alpha}$, where $r$ is the variance ratio $\frac{\sigma_{\mathbf{W}}}{\sigma_{\mathbf{R}}}$ and $\alpha$ is a hyperparameter to search for the optimal control. Given $r<1$ (the distribution of $r$ is given in Fig. 10), making $\alpha<1$ further scales up $\sigma_{\mathbf{R}}$, which leads to lowered correlation between $\mathbf{W}$ and $\mathbf{W-R}$, making it difficult to recover $\mathbf{W}$ from $\mathbf{W-R}$. Moreover, setting $\alpha>1$ can decrease $\sigma_{\mathbf{R}}$, making the distribution being biased according to Eq. 5. Experiments in Fig. 7 show that setting $\sigma_{\mathbf{R}}$ slightly smaller than $\sigma_{\mathbf{W}}$ can obtain favorable performance, indicating that the information loss of $\mathbf{W}$ has a greater impact than a biased adaptation term. In the implementation, we chose a moderate smoothing factor $\alpha=1.5$ for the trade-off.

## 6 Conclusion

We propose IntLoRA, a novel joint adaptation and quantization framework which can address the arithmetic inconsistency by employing integer low-rank parameters, to push the efficiency limits of diffusion model fine-tuning. We propose the quantization-adaptation separation to allow the coexistence of zero-initialized gradient and quantization-friendly distribution. We further introduce the multiplicative low-rank adaptation to achieve a decoupled quantizer of pre-trained and adaptation weights for PTQ-free weight merge, accompanied by the variance matching control to adjust the channel-aware variance for accurate adaptation control. Benefiting from the elegant design, we provide two variants of IntLoRA, which either use int-multiplication or bit-shifting to adapt the quantized pre-trained models. Through transferring the adaptation weights to the integer arithmetic, our IntLoRA demonstrates its effectiveness across different pre-trained models and various downstream tasks, while exhibiting impressive efficiency across model tuning, storage, and inference.

## Appendix

## Appendix A Evaluation on natural language

In the main paper, we mainly validate the effectiveness of our IntLoRA on the image generation tasks. In this section, we turn our focus to the natural language to give a broader view of performance comparison. Specifically, we apply different methods to fine-tune the Llama3-8B model (Dubey et al., ) and use the MetaMathQA (Yu et al., ) dataset for training and GSM8K (Cobbe et al., ) dataset for testing. In all experiments, we fine-tune the model using the AdamW optimizer for 2 epochs with the cosine learning scheduler, and the warm-up ratio of the learning scheduler is set as 0.005. We follow the evaluation tools in MetaMathQA, which use the Alpaca prompt and evaluate the model in zero-shot. Due to the GPU memory limitation, we only append the LoRA layer to the attention query and value projection matrices. The comparison results are shown in Sec. H.1. It can be seen that our IntLoRA matins stable performance when transferring to natural language tasks. We also provide some testing cases in Appendix H for better presentation.

## Appendix B Further explanation of the auxiliary matrix.

In the proposed method, the auxiliary matrix $\mathbf{R}$ is crucial to ensure quantization-friendly distribution and meaningful optimization trajectories. Here, we summarize two aspects of the role of $\mathbf{R}$ in the proposed method. First, $\mathbf{R}$ can be viewed as an initialization parameter for trainable parameters $\mathbf{AB}$. Specifically, we use $\mathbf{R}$ without gradient in the proposed AQS to guarantee easily quantized adaptation distributions while guaranteeing zero-initialized gradient trajectories. Second, the presence of $\mathbf{R}$ in the adaptation term also implies that it can be used to control the distribution of the adaptation term, thus allowing for more challenging quantizers, such as log2 quantization. For this, we propose the VMC, which makes the expectation of the adaptation term converge to zero, enabling as many log-scale buckets to be used as possible. Despite this indispensable role of $\mathbf{R}$, finding the optimal shape and variance of $\mathbf{R}$ remains challenging. In this work, we attempt to solve this from an engineering perspective by ablating different distributions and the variance scales. Experimental results demonstrate the effectiveness of this solution.

## Appendix C Differences from QA-LoRA

In this section, we give a detailed discussion about the differences between the proposed IntLoRA and QALora (Xu et al., ). First, one of the limitations of QA-LoRA is that it requires the pre-trained weights and the adaptation weights to share the same quantizer, which leads to a discrete parameter search space, limiting the adaptation capability for downstream tasks. In contrast, our IntLoRA ensures a more powerful adaptation through the proposed MLA which reformulates the form from additive to multiplicative, thus allowing independent quantizers. Second, the adaptation weights of QALoRA are still in FP, leading to storage cost as well as FP addition for weight merge during deployment, whereas our IntLoRA only needs to store INT weights while fusing weights through hardware-efficient integer multiplication or bit shifting. Third, QALoRA requires additional group quantization in the input channel dimensions, leading to additional GEMM core design, while our approach uses a common quantization strategy, thus facilitating practical deployment.

## Appendix D More implementation details

For the subject-driven generation, we use the AdamW optimizer with a weight decay of 1e-2 and fine-tune the query, key, value, and output projection layer. The learning rate is set to 6e-5. The batch size is set to 1, and the number of training steps is 400. The rank of the LoRA is set to 4. We adopt the prior preservation strategy as Dreambooth (Ruiz et al., ) to generate 200 class images.
For the controllable generation, we fine-tune the model for 11 epochs for Canny-to-Image tasks and 20 epochs for Landmark-to-Face and Segmentation-to-Image tasks. The learning rate is set to 1e-5 using the AdamW optimizer. The LoRA rank is set to 4. The batch size is set to 8 and the image resolution is $512\times 512$ for all three tasks.
For the style-customized generation, we fine-tune the pre-trained model using the AdamW optimizer with a learning rate of 5e-5. Since it involves a larger SDXL, we chose a relatively large LoRA rank of 64 for all compared methods, since there is only one style image as well as the larger pre-trained parameters. We fine-tune for 500 steps with batch size 1. Similar to StyleDrop (Sohn et al., ), we only use one image as the style image and find it works well. The style images and text prompts for evaluation are given in Appendix H. The variance ratio in the variance matching control is surrogated as the value range ratio, i.e., $r=\frac{\max\{|\max(\mathbf{W})|,|\min(\mathbf{W})|\}}{\min\{|\max(\mathbf{R})
|,|\min(\mathbf{R})|\}}$.

**Table 6: Quantitative comparison on the natural language tasks of mathematical answering.**
| Methods | LoRA-FP | QLoRA | QA-LoRA | IR-QLoRA | IntLoRAMUL | IntLoRASHIFT |
| --- | --- | --- | --- | --- | --- | --- |
| #praram | 1.17M | 1.17M | 1.18M | 1.18M | 1.17M | 1.17M |
| accuracy | 62.24% | 64.06% | 63.53% | 63.00% | 64.23% | 64.10% |

## Appendix E Additional ablation experiments

Figure: Figure 8: Ablation experiments of different LoRA ranks.
Refer to caption: x8.png

Ablation on the LoRA rank.
The low-rank $d$ in LoRA is a trade-off between performance and efficiency. A larger rank improves the adaptation ability by training more parameters but comes with larger training and storage costs, and vice versa. Here, we give the impact of different rank setups on performance in  Fig. 8. One can see that the performance generally improves as we increase the rank, but the rate of growth varies. For instance, the increase speed from rank=4 to rank=8 increases inferior to the one of from rank=2 to rank=4. Moreover, increasing the rank to 16 can generally obtain better results than its lower counterpart. In practice, considering the trade-off between performance and efficiency, we select a moderate rate rank=4.

Figure: Figure 9: The effects of VMC for IntLoRAMUL.
Refer to caption: x9.png

The effects of variance matching control for IntLoRAMUL.
In this work, we propose the variance matching control to adjust the variance of $\mathbf{R}$, so that allows the log2-quantization of the adaptation term to obtain the IntLoRASHIFT. In other words, the VMC is primarily introduced for IntLoRASHIFT. Despite we also apply the VMC to IntLoRAMUL, given the IntLoRAMUL does not require such strict constraints on the distribution shape of the adaptation term, it is interesting to investigate the influence of variance matching control on the performance of IntLoRAMUL. To this end, we adjust the smoothing factor $\alpha$ to adjust the strength of the VMC, e.g., setting $\alpha$ to zero can lead to the removal of the VMC. The results of the IntLoRAMUL under different VMC scales are shown in  Fig. 9. As one can see, despite the VMC being initially proposed for the log2-quantization, the well-structured distribution also facilitates uniform quantization. For example, when we set the $\alpha$ approaching to zero, i.e. the VMC is close to being removed, the performance of IntLoRAMUL appears similar pattern as the IntLoRASHIFT, which suffers a significant performance drop. Moreover, the performance gains gradually converge when the $\alpha>1.5$. In short, the VMC can not only allow the log2-quantization to work but also improve the performance of the uniform quantization.

Distribution shape for auxiliary matrix.
In Sec. 5.3, we provided different symmetric distributions including Gaussian, StudentT, Laplace, and Cauchy.  Fig. 12 gives the results of sampling from different distributions. The Laplace distribution possesses light tails, and the shape of the distribution is convex, i.e., $f^{\prime\prime}(x)>0,x\neq 0$. This unique property makes it easy to control the value of the adaptation term to produce distributions that are friendly to log2 quantization, i.e., most samples are clustered around the zero to use as many bins as possible. This analysis is also verified by the experiments in  Tab. 5, which shows that the Laplace distribution achieves the best performance.

Figure: Figure 10: The value distribution of the channel-wise variance ratio $r$
Refer to caption: x10.png

Reasons behind channel-wise control in VMC.
In the main paper, we study how to control the auxiliary matrix to produce a compatible $\sigma_{\mathbf{R}}$ by searching for the $r^{\alpha}$. As for the variance ratio $r$, it is worth noting that we adopt a per-channel scaling factor $r\in\mathbf{R}^{C_{out}}$ instead of the per-tensor one. Here we elaborate on the reasons for this. As shown in Fig. 11, we give a boxplot of the pre-trained weight $\mathbf{W}$ and it can be seen that the values for each channel exhibit different variances. Therefore, considering that the auxiliary matrix has a large impact on performance, we opt for this fine-grained channel-wise control. In addition, since $r$ is task-agnostic, it can be computed in advance and stored once. Finally, we give the distribution of $r$, and one can see that $r$ is generally less than 1, with a single peak and a left-skewed distribution shape.

Figure: Figure 11: The value ranges of different channels in the pre-trained weights.
Refer to caption: x11.png

Figure: Figure 12: The shape of different distributions for initialing the auxiliary matrix.
Refer to caption: x12.png

## Appendix F Advantage Discussion of IntLoRA.

Here, we would like to discuss the advantages of our InLoRA, to highlight the contribution of this work. First, since the downstream fine-tuning is performed on the quantized pre-trained weights, and thus the adaptation pipeline with our IntLoRA only needs to load the quantized weights, reducing memory footprint from FP weights. Second, transferring the adaptation parameters to also the INT arithmetic allows all weights of the model can be stored in INT format, reducing the disk space for storage. Thirdly, thanks to the designed multiplicative adaptation form, our IntLoRA enables seamless weight merge of quantized pre-trained weights and adaptation weights at test time without additional post-training quantization, streamlining the adaptation process while alleviating performance drop from quantization.

## Appendix G Limitation and future works

Although the proposed IntLoRA can effectively improve the efficiency of diffusion model fine-tuning by allowing the adaptation parameters also on the integer arithmetic, the proposed framework can be further improved in the following aspects. First, although the trainable low-rank weights are quantized with STE, these quantized weights are still in FP type during tuning to enable accurate gradient updates. Therefore, it is promising to specifically design integer-type propagation. Despite this seems challenging, it can further reduce the training cost and accelerate the adaptation process. Second, although we introduce a feasible way that uses hyperparameter search of the smoothing factor $\alpha$ to find a compatible $\sigma_{\mathbf{R}}$ as well as the appropriate distribution shape of $\mathbf{R}$, it can be more elegant if we can use advanced mathematical analysis techniques, such as functional analysis, to find the statistical properties a suitable $\mathbf{R}$ should satisfy. Third, this work mainly focuses on the efficient acceleration of LoRA due to its prevalence among the PEFT techniques. Applications to other PEFT methods for hardware-efficient adaptation could be interesting future work.

## Appendix H Additional visualization results

- •
Fig. 13 gives more samples on the subject-driven generation tasks.
- •
In Fig. 14, we give more samples of the segmentation-to-image tasks.
- •
In Fig. 15, we give more samples of the face landmark-to-face image tasks.
- •
In Fig. 16, we give more samples of the canny edge-to-image tasks.
- •
Fig. 17 provides more samples of the results of the style-accustomed generation.
- •
In Fig. 18, we give the style images and the text prompts used for evaluation on the style customized generation tasks.
- •
In Sec. H.1, we give some case studies of the mathematical question-answering task using the fine-tuned Llama3-8B model.

Figure: Figure 13: More qualitative comparison results on subject-driven generation.
Refer to caption: x13.png

Figure: Figure 14: More qualitative comparison results on segmentation to image task. The ‘Ours’ denotes the IntLoRASHIFT. Zoom in for better effects.
Refer to caption: x14.png

Figure: Figure 15: More qualitative comparison results on landmark to face task. The ‘Ours’ denotes the IntLoRASHIFT. Zoom in for better effects.
Refer to caption: x15.png

Figure: Figure 16: More qualitative comparison results on canny to image task. The ‘Ours’ denotes the IntLoRASHIFT. Zoom in for better effects.
Refer to caption: x16.png

Figure: Figure 17: More qualitative comparison results on style-accustomed generation. The ‘Ours’ denotes the IntLoRASHIFT. Zoom in for better effects.
Refer to caption: x17.png

Figure: Figure 18: The style images used for training and the text prompts for evaluation.
Refer to caption: x18.png

### H.1 Cases of mathematical question answering.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Have asked in Weakness section.
soundness: 3
strengths: 1) The presentation of challenges and contributions are clear to me. 
2) The presentation of methods and experiments are clear to me.
summary: The authors propose IntLoRA, which employes INT low-rank parameters to adapt the quantized diffusion models, to address the arithmetic inconsistency between the quantized pre-trained weights and adaptation weights. All the process will operate directly on INT arithmetic in training and merged weights at inference stage will also be on INT format. Apparently, it will speed up both the training and inference stage.
weaknesses: 1) Recent works, e.g., EfficientDM and LoftQ, have worked out quantized diffusion models using LoRA. Different from this paper, EfficientDM focus on quantized merged weights at inference stage. Can you compare with it? BTW, I am doubting the importance of the speed-up for the training stage as the pretrained weights is fixed, only small adapters are updated.  Can you show how much speed-up as compared to full-precision? or at least theorotically show the improvement?

2) From my understanding, the proposed methods also can be used in NLP tasks. As the baselines have results on NLP tasks in their papers, why not verify the proposed methods on NLP tasks? Could you show some experimental results on NLP tasks?

3) For diffusion models, seems it have standard/common verification on some tasks, please check EfficientDM paper. As all baselines are implemented by authors, I just doubt the reliablity because of hyper-parameter tuning. Maybe it is better compare with SOTA results in paper.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 2
questions: * Line 252: Could you provide any insights or justification for the assumption that $\mathbf{A}\mathbf{B}$ is orders of magnitude smaller than $\mathbf{R}$?
* Line 260: What is the purpose of a zero-mean adaptation term, and why is it better?
* Table 4: Why does the storage reduction exceed $8\times$ (e.g., $9.8/1.2 > 8$ and $0.34/0.04 > 8$)? If the model is stored in 32 bits, the reduction should be slightly less than $8\times$ due to the additional overhead from zero points and scaling factors. If stored in 16 bits (the preferred format), the reduction should not exceed $4\times$.
* Figure 6: Could you clarify the difference between VMC $\sigma_{\mathbf{R}}$ and the appropriate $\sigma_{\mathbf{R}}$? Additionally, how can one observe the large quantization error from the second image in the second row of the figure?
soundness: 3
strengths: * The paper presents a strong motivation, addressing a key limitation in current quantization methods: the need for re-quantization after applying adapters. This limitation has prevented the wide adoption of quantization methods in diffusion models.
* The concepts of Adaptation-Quantization Separation (AQS), Multiplicative Low-rank Adaptation (MLA), and Variance Matching Control (VMC) are innovative and well-supported by mathematical analysis. Their effectiveness is further validated through comprehensive experimental results.
* The authors' support for log2 quantization, a challenging but highly hardware-efficient setting that further enhances the practical utility of IntLoRA.
summary: This paper introduces IntLoRA, a method that quantizes the LoRA branch to integers for parameter-efficient fine-tuning (PEFT) in diffusion models. Traditional approaches typically use 16-bit precision for LoRA branches and focus on quantizing only the base model during fine-tuning. However, for inference, these methods often require re-quantization when the LoRA branches are fused with the base model. Unlike prior methods, such as QLoRA, IntLoRA fine-tunes the LoRA branches in a quantization-aware manner. To maintain adapter performance, it incorporates techniques like Adaptation-Quantization Separation (AQS), Multiplicative Low-rank Adaptation (MLA), and Variance Matching Control (VMC), and supports both linear and log2 quantization. Extensive experiments across various downstream tasks—including subject-driven generation, controllable generation, and style customization—demonstrate the effectiveness of IntLoRA in both visual quality and model size reduction.
weaknesses: * The paper exclusively focuses on weight-only quantization, where activations remain at 16-bit precision. Since diffusion models are primarily compute-bound, quantizing only the weights does not yield speedups during inference. Additionally, in a weight-only quantization setting, users can choose not to fuse adapters, thereby avoiding re-quantization. As a result, the primary benefit of IntLoRA is just a reduction in adapter size compared to conventional PEFT methods—a relatively minor contribution, given that LoRA adapters are already small.
* he proposed PEFT method does not reduce training memory usage compared to existing PEFT methods (e.g., QLoRA). Furthermore, quantization-aware training of adapters may slow down training and even increase memory usage. The paper should discuss the training speed and memory usage.
* Clarification on storage requirements for $\mathbf{R}$ is necessary. Storing $\mathbf{R}$ after training the adapters would require significant storage, which may limit the method's practicality. If $\mathbf{R}$ is not stored, the authors should explain how it is obtained during inference. Also, note that $\mathbf{R}$ should derive from $\mathbf{W}_{\text{round}}$ rather than $\mathbf{W}$, as only quantized weights are accessible during PEFT.
* Writing:
  * Using "FP" to refer to original LoRA training is ambiguous, as there are low-precision formats like FP8 or FP4. Consider using "16-bit" instead. Note also that QLoRA uses NF4 for weight representation, which is not integer-based. Therefore, Lines 190–202 need to be rewritten.
  * Line 156: The dimension of $\mathbf{B}$ should be $d \times C_{\text{in}}$.
  * Figure 2: The caption lacks detail, and the figure is difficult to interpret.
  * Line 229: Refer to Section 5.3 on how to determine $\mathbf{R}$.
  * Line 265: Need to clarify $\rho$ is the correlation coefficient.
  * Table 4: Correct "FP addtion" to "FP addition".
  * Figure 7: Add axis labels for clarity.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. The proposed method, IntLoRA, demonstrates substantial potential to enhance the performance of quantized models beyond simple adaptation. Integrating IntLoRA’s innovative techniques, such as integer low-rank parameters and network-wide reconstruction calibration, not only maintains but also significantly boosts the efficacy of models operating under quantization constraints.

2. The authors introduce the use of an auxiliary matrix in the AQS. It would be helpful to clarify whether the introduction of this auxiliary matrix introduces additional quantization difficulty like outliers to the pre-trained model weights.

3. The paper overlooks an important baseline in its experimental setup or discussion. The study “EfficientDM” by He et al., 2023, which similarly employs low-rank parameters for fine-tuning pre-trained models, is notably absent. Like IntLoRA, EfficientDM also allows for the merging of low-rank parameters into pre-trained model weights post-training. Including this baseline could enhance the comparative analysis, providing a clearer benchmark of IntLoRA’s performance against existing methodologies with similar strategies.

4. The authors merge integer low-rank parameters with quantized pre-trained model weights after training, a process that might lead to value overflow. It would be beneficial for the paper to address how this potential issue is managed. Specifically, detailing the mechanisms or techniques employed to prevent or mitigate overflow—such as scaling factors, normalization methods, or safeguards within the merging algorithm—would provide a clearer understanding of the reliability of the proposed method in handling data integrity during integration.
soundness: 3
strengths: The paper demonstrates a strong and clear motivation by addressing a critical challenge in the domain of machine learning models—specifically, the adaptation of quantized diffusion models using integer low-rank parameters. This innovative approach effectively bridges the gap between maintaining precision and enhancing computational efficiency. Furthermore, the paper successfully resolves the prevalent issue of arithmetic inconsistency between pre-trained weights and adaptation parameters.
summary: The paper introduces IntLoRA, a pioneering method for adapting quantized diffusion models to optimize both training and inference efficiencies. It tackles the arithmetic inconsistency between low-rank parameters and pre-trained model weights by employing integer-based low-rank parameters. During training, the method applies quantization to the pre-trained model weights, and post-training, integrates these integer low-rank parameters seamlessly for efficient inference. To facilitate quantization-aware training, the authors propose the Adaptation-Quantization Separation (AQS), which allows for the coexistence of zero-initialized gradients and a quantization-friendly distribution. Additionally, a Variance Matching Control (VMC) mechanism is developed to finely tune the channel-aware variance, ensuring precise adaptation control.  Extensive experimental results indicate that IntLoRA not only competes with but often surpasses traditional methods in performance, significantly reducing memory usage and computational demands.
weaknesses: 1.	The clarity of some explanations could be improved, particularly concerning why the all-zero distribution is not quantization-friendly. The text should elucidate why such a distribution necessitates a distinct quantizer design at the beginning of tuning. Providing a detailed example or analytical explanation on gradients would greatly enhance understanding, highlighting the specific challenges and potential impacts on the model’s performance during quantization.

2.	In the description of the VMC, the authors introduce a scalar $\alpha$ used as an exponent of $r$ to finely adjust the search for the optimal auxiliary matrix. However, the method for conducting this search remains unclear. It would be beneficial for the authors to specify the objective function used in this search process. Clarifying how $\alpha$ and $r$ are optimized, including the criteria and algorithms employed, would provide a more comprehensive understanding of the method’s effectiveness and implementation.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: See weaknesses above.
soundness: 3
strengths: 1.	Reducing storage costs is significant for adaptation tasks.
2.	The idea of multiplicative low-rank adaptation is novel.
summary: The paper introduces IntLoRA, which uses integral low-rank parameters to adapt quantized diffusion models. First, Adaptation-quantization separation (AQS) is proposed to overcome the difficulty of vanilla zero-initialized LoRA parameters is not quantization-friendly. Then, Multiplicative low-rank adaptation is proposed to enable the fusion of quantized weights and LoRA parameters. Variance matching control is further proposed to make the distribution suitable for log2-quantization. Experimental results show that IntLoRA improves the efficiency of adaptation while maintaining performance.
weaknesses: 1.	The training costs are not reported in the paper.
2.	In section 5.2, the authors mentioned that “IntLoRA is the only one that achieves INT type adaptation weights”, which is not true since EfficientDM also uses quantized LoRA weights.

Meta-review: The paper titled "IntLoRA: Integral Low-rank Adaptation of Quantized Diffusion Models" introduces IntLoRA, a novel parameter-efficient fine-tuning (PEFT) method tailored for quantized diffusion models. The primary innovation lies in utilizing integer-based low-rank adaptation parameters, enabling seamless integration with quantized pre-trained weights through integer multiplication or bit-shifting. This approach aims to enhance both training and inference efficiencies by reducing memory usage, storage costs, and eliminating the need for additional post-training quantization (PTQ). The authors present comprehensive experimental results demonstrating that IntLoRA achieves performance comparable to or surpassing traditional LoRA methods while offering significant efficiency improvements across various downstream tasks, including computer vision and natural language processing (NLP).

Despite the promising contributions, several critical concerns undermine the paper's suitability for acceptance. Firstly, the comparison with existing methods such as EfficientDM and LoftQ is insufficiently addressed, particularly regarding the applicability and performance on standard benchmarks. Reviewer wQ3r highlighted the lack of comparisons on established NLP tasks and questioned the reliability of the experimental setups, suggesting potential biases due to hyper-parameter tuning. Although the authors provided additional experiments and clarifications during the rebuttal, the persistent concerns from Reviewer wQ3r regarding the method's novelty and practical significance remain unresolved. Additionally, the paper's focus on weight-only quantization limits the claimed inference speedups, as activation quantization is not comprehensively explored. These weaknesses, coupled with the unresolved doubts about the method's generalizability and comparative advantage, lead to the recommendation to reject the paper in its current form.

Decision: Reject