# Multi-Scale Universal Style-Transfer Network Based on Diffusion Model
## 3 Proposed Method
### Overall Architecture
#### 3.2.1 Coarse Style-Transfer Module  
The purpose of the first round of style transfer is to quickly complete the initial image transformation while ensuring the quality of the transfer. By comparing the runtime and performance of several style-transfer modules, the main style-transfer module selected here is the currently effective CAP-VSTNet [36]. The overall module consists of three parts: an invertible residual module, a channel pruning module, and a linear transformation module. First, the content and style images are downsampled separately to obtain new content and style images. Given a content image and a style image, the invertible residual module is first used to map the input content and style images into a latent space. Next, the channel pruning module removes redundant channel information from the content- and style-image features to enable more efficient style transfer. Finally, the linear transformation module transfers the content representation to match the statistical characteristics of the style representation. The invertible residual module is illustrated in Figure 3.  
In the network architecture, each invertible residual block takes a pair of inputs \((x_{1},x_{2})\) and outputs \((y_{1},y_{2})\). The module applies a channel-wise splitting strategy that divides the input features equally along the channel dimension. Because the invertible residual block processes only half of the channels at each step, it is necessary to perturb the feature maps along the channel axis. Each block within the invertible residual network can be reversed by subtracting the residual, as detailed in the following equations:  
\[x_{1},x_{2}=split(x) \tag{1}\]  
\[y_{1}=x_{1} \tag{2}\]  
\[y_{2}=x_{2}+F(x_{1}) \tag{3}\]  
The residual functions \(F\) are implemented by consecutive convolutions with a kernel size of 3. Each transformation layer is followed by a ReLU activation, except for the last one. To capture large-scale style information, a squeezing module is used to reduce the spatial dimensions by a factor of 2 while increasing the channel dimensions by a factor of 4. By  
Figure 3: Invertible residual block structure.  
combining reversible residual blocks and the squeezing module, a multi-scale architecture is realized.  
The cascaded reversible residual blocks and squeezing module design in CAP-VSTNet lead to the accumulation of redundant information during the forward inference process as the number of squeezing modules increases exponentially. This redundant information negatively impacts the stylization quality. In [17; 37], channel compression is employed to address the redundancy issue and promote better stylization. In the design of this main network module, a Channel Refinement (CR) module is used, which is better suited for connecting cascaded reversible residual blocks. As shown in Figure 4, the CR [38; 39] module first applies a zero-padding module that increases the latent dimension to ensure that the input content- and style-image feature channels are divisible by the target channel size. Then, patch reversible residual blocks are utilized to integrate large-scale contextual information.  
Where \(f_{c}\) and \(f_{s}\) denote the input content and style features, respectively, and \(Z_{c}\) and \(Z_{s}\) denote the output content and style features, respectively. The _spread_ operation refers to expanding the channel information into a spatial dimension patch.