Deep learning image generation technology for enhancing the presentation effect of image art based on artificial intelligence

Deep learning image generation technology for enhancing the presentation effect of image art based on artificial intelligence

Based on the critical analysis and systematic comparison of existing studies in the literature review, this section designs an innovative framework named Style Diffusion-HD, aiming to address the core problems of current methods, such as rigid multimodal fusion, poor style consistency in super-resolution imaging, and incomplete evaluation systems. The framework constructs a complete technical path from creative conception to high-quality final artistic output through three closely cooperating advanced modules: SIA-LDM, FM-based super-resolution imaging, and a multi-dimensional evaluation system, as illustrated in Fig. 1. It intuitively shows the cascaded structure and feature flow of the two core modules of Style Diffusion-HD, and clarifies the whole process from bimodal input to high-resolution artistic image output.

Fig. 1Fig. 1

StyleDiffusion-HD framework (StyleDiffusion-HD consists of two core cascaded modules: SIA-LDM and FM-based SR. The SIA-LDM module achieves precise bimodal control of text content and visual style through CLIP feature extraction and dynamic style injection attention mechanism, generating 512 × 512 resolution artistic images. The FM-based SR module performs 4× super-resolution on the generated images via deterministic continuous flow mapping, outputting 2048 × 2048 high-resolution images while maintaining artistic style consistency. In the figure, the red solid line represents the feature flow direction, and the blue dashed line represents the style constraint direction.)

Potential diffusion model based on SIA

In the artistic creation process, artists are often inspired by both linguistic concepts and visual references26. Using the standard LDM as the basic framework, SIA-LDM innovatively embeds the Style Injection Attention (SIA) module into the denoising U-Net. Its core design goal is to achieve dynamic and adaptive control of text content and visual style during the latent space denoising process. The whole framework consists of two key steps: conditional encoding fusion (constructing a bimodal creation blueprint) and SIA mechanism injection (applying blueprint constraints to the entire denoising process). Based on LDM, this study introduces the SIA module to achieve more accurate and finer control of artistic styles.

The working principle and integration method of the SIA module are illustrated in Fig. 2. In Fig. 2, the forward propagation direction of features is, in turn, the text semantic features and visual style features extracted by CLIP → fusion condition vector Fcond→U-Net feature graph of U-NET layers Flatent → feature output after attention calculation. The blue dotted line is the reverse direction of style constraints, and style attention constraints are injected into the shallow layer, middle layer and deep layer of U-Net from the fusion condition vector to realize the full-level style control from the whole composition to the local details. The attention calculation layer is embedded in three key levels of U-Net: Down-block3, Middle-block and Up-block3. Each level performs multi-head attention calculation with Flatent as Query and Fcond as Key/Value (Eqs. 3–4), and outputs projection matrix to complete feature fusion and then transmits it to the next level. By dynamically injecting multimodal conditional information during the denoising process, it significantly enhances the artistic expressiveness of the generated works.

Fig. 2Fig. 2

Schematic diagram of integration of style attention injection module (the core components and feature flow of the SIA module are fully consistent with the conditional encoding fusion (Eqs. 1–2) and SIA attention mechanism (Eqs. 3–4) described below, with unified symbolic notation for easy cross-reference).

Conditional coding and fusion

In the research process, this study accepts two forms of input: text prompts describing image content and reference images defining artistic style. This dual-input design simulates the creative process of human artists, focusing on both “what to paint” and “how to paint”27. Given a text prompt P and a style reference image Istyle, the Contrastive Language-Image Pre-training (CLIP) model, pre-trained on large-scale image-text pairs, is utilized to extract their semantic and visual features:

$${F_{text}}=\tau (P),\quad {F_{style}}={\text{CLI}}{{\text{P}}_{vision}}({I_{style}})$$

(1)

\({F_{text}}\) is the text semantic embedding vector, carrying the content information of the image. \({F_{style}}\) is the visual feature vector of the style image, encoding the stylistic characteristics of artistic expression. τ represents the CLIP text encoder28. This study selects CLIP as the sole semantic alignment backbone network, rather than recent alternatives such as BLIP-2, FLAVA, and ALBEF. The core rationale is that CLIP has three key advantages in semantic alignment tasks for AI art generation: stronger cross-modal alignment ability, better feature generalization, and higher computational efficiency, making it more suitable for the bimodal feature fusion requirements of this study. To effectively combine these two types of information from different modalities, this study projects them into a unified representation space through a fully connected layer:

$${F_{cond}}=W \cdot [{F_{text}};{F_{style}}]+b$$

(2)

W and b are learnable weights and biases, respectively. [; ] denotes the concatenation operation. \({F_{cond}}\) is the fused conditional vector. The fusion method using simple concatenation and single-layer linear projection to represent complex artistic style features is not a trivial feature integration, but is based on two core design rationales. First, after large-scale image-text pre-training, the text semantic embeddings and visual style embeddings extracted by the CLIP model lie in a high-dimensional aligned semantic space, and their feature distributions have natural compatibility for fusion, enabling effective information integration without complex nonlinear transformations. Second, the core characteristics of artistic style, including hue, brushstrokes, and compositional logic, are global explicit features in CLIP visual embeddings. Linear projection can unify the dimensions of bimodal features and learn adaptive weights while preserving these core features, avoiding feature redundancy and style information distortion caused by complex network layers, significantly reducing computational overhead, and adapting to the end-to-end training requirements of diffusion models. Essentially, this fusion process constructs a creative blueprint that contains both content instructions and style guidelines.

SIA mechanism

The core idea of SIA module is to make the generation process refer to this creative blueprint at each key step of image generation. Compared with existing attention-based conditioning methods such as cross-attention mechanisms and static condition injection strategies, the core innovations of the SIA module lie in two aspects: dynamic bimodal attention matching and hierarchical style injection, which break through the limitations of rigid modality fusion and single injection layer in traditional methods. Most existing cross-attention methods simply concatenate text and visual features as unified Key/Value for attention computation, and cannot adaptively adjust the weights of the two modalities according to the time steps and spatial positions of image generation. Traditional condition injection is only implemented at a single layer, either shallow or deep, of the U-Net, which easily leads to inconsistency between the overall style and local details of the generated images. The module is subtly embedded into multiple layers of the denoising U-Net, ensuring that both the overall composition and local details are guided by style conditions29,30,31. In terms of the actual effect of denoising trajectory control, the standard cross-attention mechanism only applies text/visual features as fixed global constraints to the denoising trajectory during the diffusion model denoising process. The denoising direction is determined by predefined cross-attention weights and cannot be dynamically adjusted according to the real-time state of image generation (time steps, spatial features). In contrast, the SIA mechanism takes the intermediate feature map in the latent space as Query and the fused condition vector as Key/Value, making the denoising trajectory a dynamically adaptive optimization process. In the initial denoising stage (high noise level), SIA strengthens the guidance of text content features, allowing the denoising trajectory to evolve toward the overall composition that conforms to the content description. In the later denoising stage (low noise level), SIA adaptively enhances the constraints of visual style features, optimizing the denoising trajectory toward local brushstrokes and tone details that match the reference style, thereby achieving staged precise denoising from content to style.

At time step t, let the intermediate feature map of the U-Net be \({F_{latent}} \in {R^{H \times W \times C}}\), which represents the current state of the image during the generation process. SIA mechanism takes Flatent as the Query, and the conditional vector Fcond as the Key and Value to perform multi-head attention computation:

$$Hea{d_i}=Attention({F_{latent}}W_{i}^{Q},{F_{cond}}W_{i}^{K},{F_{cond}}W_{i}^{V})$$

(3)

$${\text{SAA}}({F_{latent}},{F_{cond}})={\text{Concat}}({\text{Hea}}{{\text{d}}_1}, \ldots ,{\text{Hea}}{{\text{d}}_h}){W^O}$$

(4)

In Eqs. (3) and (4), \(W_{i}^{Q},W_{i}^{K},W_{i}^{V} \in {R^{C \times {d_h}}}\) are the projection matrices of the i-th attention head. h is the total number of attention heads. \({W^O} \in {R^{h \cdot {d_h} \times C}}\) is the output projection matrix. \({\text{Attention}}(Q,K,V)={\text{softmax}}\left( {\frac{{Q{K^T}}}{{\sqrt {{d_k}} }}} \right)V\) is the standard Scaled Dot-Product Attention (SDPA) function. The above equations play a practical dynamic role in generation: multiple attention heads perform multi-dimensional attention computation on latent space features and fused condition vectors. Different attention heads capture different dimensional features of artistic style separately, and then fuse multi-dimensional features through the output projection matrix. This design enables each spatial position in the generation process to accurately retrieve the most matching style and content information from the fused condition vector according to its own feature attributes, achieving precise alignment between local features and global style.

This design enables each spatial position during the generation process to adaptively retrieve the most relevant style and content information from the conditional vector. The proposed SIA mechanism differs from existing attention-based conditioning methods in the following key aspects: ① Existing cross-attention methods use text and visual features indiscriminately as Query/Key/Value, whereas the SIA mechanism takes the intermediate feature maps of the diffusion process as dedicated Query and the fused bimodal condition vectors as dedicated Key/Value. This achieves precise matching between generation states and conditional information and avoids ineffective mixing of modal features. ② Traditional methods fuse multimodal features using fixed weights, whereas the SIA mechanism adaptively allocates weights for text content and visual style according to the generation time step t and spatial position through independent computation of multiple attention heads and dynamic mapping of the output projection matrix. ③ Existing condition injection strategies only operate on a single layer of the U-Net, whereas the SIA module is embedded into multiple layers of the denoising U-Net. This ensures that style constraints run through the full-level generation process from overall composition and local structure to fine-grained textures throughout the entire image generation pipeline, enabling global control of style consistency. Finally, this study trains the entire system as follows:

$$\:{\mathcal{L}}_{SAA}={E}_{\mathcal{E}\left(x\right),{F}_{cond},\epsilon \sim\:\mathcal{N}\left(\text{0,1}\right),t}\left[\|\epsilon -{\epsilon }_{\theta\:}({z}_{t},t,{F}_{cond}{)\|}_{2}^{2}\right]$$

(5)

In this equation, \(\mathcal{E}\) denotes the pre-trained VQ-VAE encoder, which encodes the image x into the latent variable Z0. Zt is the noisy latent variable obtained by adding noise to Z0 at time step t. \(\epsilon\) represents the target Gaussian noise. \({\epsilon _\theta }\) is the conditional denoising U-Net integrated with the SIA module. t is the time step sampled from a uniform distribution. During model training, the core objective is to enable the SIA-integrated denoising U-Net to accurately predict the noise in the latent space and perform denoising at any time step t, while continuously incorporating CLIP-encoded text-visual bimodal conditional constraints throughout the denoising process, so that the denoising trajectory always meets the dual requirements of text content and visual style. This model adopts a multi-objective joint optimization strategy in the training phase. In addition to taking the mean squared error (MSE) of Gaussian noise prediction as the basic optimization objective, style loss (SL) and CLIP semantic loss are also introduced for joint constraint. The style loss is constructed based on the Gram matrix of the VGG-19 network, and the CLIP semantic loss is realized by minimizing the CLIP feature cosine distance between the generated image and the text prompt. FID is not directly optimized during training (FID is an offline evaluation metric for model performance and cannot be used as an optimization objective for end-to-end training). Through the joint optimization of style loss and CLIP semantic loss, the style consistency and text-image semantic alignment of the model generation results are improved.

SR enhancement based on FM

Although the initial images (512 × 512) generated by SIA-LDM are satisfactory in terms of artistic style and overall composition, their resolution is still insufficient for print display or viewing on high-resolution screens32. Traditional SR methods often produce over-smoothing or introduce unrealistic textures, which undermine the original artistic style. This study introduces a generative SR model based on FM. This state-of-the-art technology can achieve high-quality up sampling in a single forward pass while perfectly preserving the original artistic style.

Given a low-resolution image ILR, its corresponding high-resolution target is IHR. This study constructs an intuitive linear interpolation path as follows:

$${\phi _t}=(1 – t) \cdot {I_{LR}}+t \cdot {I_{HR}},\quad t \in [0,1]$$

(6)

$${\mathcal{L}_{FM}}={E_{t,{I_{HR}},{I_{LR}}}}\left[ {\left\| {} \right.{v_\theta }({\phi _t},{I_{LR}},t) – ({I_{HR}} – {I_{LR}})\left. {} \right\|_{2}^{2}} \right]$$

(7)

In Eqs. (6) and (7), t denotes the path time step, sampled uniformly from [0,1]. \({\phi _t}\) represents the state of the constructed linear path at time t. \({v_\theta }\) is the vector field parameterized by the neural network. \({I_{HR}},{I_{LR}}\) is the true direction vector (i.e., the true flow) from the low-resolution image to the high-resolution image33. Throughout the process, given an initial low-resolution image \(I_{{LR}}^{0}\), a high-definition output can be obtained with only one network evaluation:

$${I_{SR}}=I_{{LR}}^{0}+{v_\theta }(I_{{LR}}^{0},I_{{LR}}^{0},0)$$

(8)

\(I_{{LR}}^{0}\) is the input low-resolution image to be enhanced by SR. \({v_\theta }(I_{{LR}}^{0},I_{{LR}}^{0},0)\) is the vector field pointing to the target high-resolution image at the path start point (t = 0). \({I_{SR}}\) is the final high-resolution output image generated by the proposed model. This method is computationally efficient and, more importantly, can preserve the style consistency of the original artwork and avoid introducing inconsistent visual elements during the up-sampling process34,35. The deterministic continuous flow mapping of the FM formulation serves as the core design advantage. Unlike the multi-step denoising super-resolution logic of diffusion-based SR, its single-step forward inference inherently avoids style shift and detail loss caused by multi-step iteration, which is the key reason why this module can independently achieve high-performance super-resolution.

Evaluation system of artistic presentation effect

In the evaluation process, this study mainly adopts three validated metrics to quantify generation quality from different perspectives. FID measures the similarity in feature distribution between generated images and real artistic image sets, with lower values indicating better generation quality and diversity. This metric reflects the overall naturalness and artistry of the works produced by the model.

CLIP Score (CS) measures the semantic consistency between the generated image Igen and the input text prompt P. A higher score indicates stronger image-text relevance, ensuring that the generated works accurately reflect the creative intent.

$${S_{CLIP}}=\cos ({\text{CLI}}{{\text{P}}_{image}}({I_{gen}}),\tau (P))$$

(9)

\({S_{CLIP}}\) denotes the generated CLIP similarity score. \({\text{CLI}}{{\text{P}}_{image}}({I_{gen}})\) is the feature vector of the generated image \(\:{\text{I}}_{\text{gen}}\) obtained through the CLIP image encoder. \(\tau (P)\) is the feature vector of the text prompt P derived via the CLIP text encoder. Cos (·) is the cosine similarity calculation function.

SL calculates the Frobenius Norm (FN) distance between the Gram Matrices (GM) of the generated image and the style reference image in the feature space of the Visual Geometry Group Network (VGG-Net).

$${{\cal L}_{style}} = \mathop \sum \limits_{l \in L} ||G({{\rm{\Psi }}_l}({I_{gen}})) – G({{\rm{\Psi }}_l}({I_{style}}))||_F^2$$

(10)

\({{\text{\varvec{\Psi}}}_l}\) denotes the feature extractor of the l-th layer in the pre-trained VGG-19 network. \(\mathcal{L}\) is the set of layers used for Gram Matrix calculation. \(G({\text{\varvec{\Psi}}}\) represents the Gram Matrix of the feature map F. \(\left\| {\left. \bullet \right\|} \right.\) denotes the FN.

Throughout the evaluation, domain experts (artists, curators) and general art enthusiasts are invited to conduct a blind evaluation of the generated results from four dimensions: artistic expressiveness, style consistency, visual detail quality, and overall appeal. A 5-point Likert scale (1 = Very Poor, 5 = Very Good) is adopted for scoring, and statistical tests are used to analyze the significance of the results. The core metric system adopted in this study, including FID, CS, and SL, is suitable for rapid evaluation in large-scale experiments. AIGC-specific quality metrics such as LMM4LMM and instruction-tuned assessment can serve as extensions to this system, used to quantify dimensions difficult to cover by traditional indicators, such as artistic connotation and emotional expression. The integration of the two can be achieved through model lightweighting in future work.