Diffusion models have demonstrated remarkable performance in image generation, particularly within the domain of style transfer. Prevailing style transfer approaches typically leverage pre-trained diffusion models' robust feature extraction capabilities alongside external modular control pathways to explicitly impose style guidance signals. However, these methods often fail to capture complex style reference or retain the identity of user-provided content images, thus falling into the trap of style-content balance. Thus, we propose a training-free style transfer approach via heterogeneous attention modulation (HAM) to protect identity information during image/text-guided style reference transfer, thereby addressing the style-content trade-off challenge. Specifically, we first introduces style noise initialization to initialize latent noise for diffusion. Then, during the diffusion process, it innovatively employs HAM for different attention mechanisms, including Global Attention Regulation (GAR) and Local Attention Transplantation (LAT), which better preserving the details of the content image while capturing complex style references. Our approach is validated through a series of qualitative and quantitative experiments, achieving state-of-the-art performance on multiple quantitative metrics.
Figures & tables
Figure 1: Comparative results of style transfer methods: Content image (top-left), style reference (bottom-left), baseline method (top-right), and our HAM (bottom-right). Red boxes denote significant identity retention disparities.
Figure 2: The overall pipeline of our method. Our proposed method consists of three main modules: global attention modulation, local attention transfer, and style injection noise initialization, which act on the self-attention, cross-attention, and noise initialization stages respectively. Through the joint modulation of the three modules, the final stylized image can retain more content identity information and capture and transfer complex style references.
Figure 3: Qualitative comparison with existing text-driven and image-driven SOTA methods. For fair evaluation, all methods use fixed random seeds: text-driven methods apply prompts directly, while image-driven methods generate style references via SD2.1 using identical prompts. Our HAM method better preserves content identity while maintaining style transfer semantics.
Method
ArtFID ↓
FID ↓
LPIPS ↓
LPIPS-Gray ↓
DINO ↑
CLIP-I ↑
CLIP-T ↑
DC ↑
CC ↑
DDIM(ICLR’21)
31.149
17.939
0.645
0.554
0.278
0.493
0.192
1.524
1.780
ControlNet(ICCV’23)
24.751
13.472
0.710
0.557
0.513
0.583
0.210
1.831
1.916
StyTR 2 (CVPR’22)
17.460
10.433
0.527
0.416
0.433
0.487
0.206
1.729
1.794
InstructPix2Pix(CVPR’22)
28.319
17.657
0.518
0.415
0.575
0.620
0.211
1.908
1.963
InstantStyle(arxiv’24)
27.244
15.249
0.677
0.556
0.474
0.604
0.198
1.765
1.921
CSGO(arxiv’24)
27.116
15.207
0.673
0.527
0.482
0.581
0.197
1.775
1.893
Table 1: Quantitative comparison with existing text-driven and image-driven SOTA methods. The best results are highlighted in bold, and the second best results are underlined. The color coding indicates relative performance.
Figure 4: Qualitative results of our method HAM and the SOTA method are presented under different style references for the same content image. It can be observed that our method HAM has significant advantages in both style transfer and identity preservation.
Figure 5: Qualitative ablation study of different modules in our method. The indexes are consistent with those in the quantitative experiments.
Figure 6: Qualitative ablation study of hyper-parameters in our method. The red boxes represent the hyperparameters we selected.
No.
GAR
LAT
SINI
DINO
CLIP-I
CLIP-T
DC
CC
A
✗
✗
✗
0.609
0.626
0.220
1.963
1.984
B
✓
✗
✗
0.618
0.626
0.231
1.993
2.002
C
✗
✓
✗
0.712
0.696
0.193
2.042
2.023
D
✗
✗
✓
0.588
0.624
0.225
1.945
1.989
E
✓
✓
✗
0.746
0.696
0.202
2.099
2.040
F
✓
✗
✓
0.599
0.627
0.235
1.976
2.010
Table 2: Quantitative ablation study of different modules in our method. The indexes are the same as those in the qualitative experiments.
α
DINO ↑
CLIP-I ↑
CLIP-T ↑
DC ↑
CC ↑
1
0.695
0.679
0.200
2.034
2.015
0.75
0.728
0.682
0.223
2.113
2.057
0.5
0.690
0.667
0.225
2.070
2.042
0.25
0.602
0.634
0.226
1.964
2.003
0
0.497
0.602
0.229
1.840
1.969
Table 3: Quantitative ablation study of hyper-parameter α in Global Attention Regulation (GAR).
β
DINO ↑
CLIP-I ↑
CLIP-T ↑
DC ↑
CC ↑
1
0.599
0.627
0.235
1.976
2.010
0.75
0.646
0.630
0.227
2.019
1.999
0.5
0.689
0.650
0.226
2.071
2.023
0.25
0.728
0.682
0.223
2.113
2.057
0
0.739
0.704
0.201
2.088
2.046
Table 4: Quantitative ablation study of hyper-parameter β in Local Attention Transplantation (LAT).
γ
DINO ↑
CLIP-I ↑
CLIP-T ↑
DC ↑
CC ↑
1
0.746
0.696
0.202
2.099
2.040
0.75
0.733
0.689
0.212
2.101
2.048
0.5
0.728
0.682
0.223
2.113
2.057
0.25
0.714
0.678
0.217
2.086
2.042
0
0.708
0.674
0.212
2.070
2.029
Table 5: Quantitative ablation study of hyper-parameter γ in Style-Infused Noise Initialization (SINI).
Reference-guided style transfer aims to preserve the semantic structure of a content image while transferring the visual appearance of a style reference. Recent diffusion-based methods achieve impressive stylization quality by exploiting strong pretrained generative priors. However, training-free approaches still face a difficult trade-off among style fidelity, content preservation, and content leakage. Direct style injection may unintentionally transfer semantic content from the style image, while fixed guidance schedules often ignore the time- and state-dependent nature of diffusion sampling. To address these limitations, we propose TRACE, a training-free diffusion style transfer framework with Time-adaptive Residual Attention Control and Content-Style Decomposition. TRACE first performs offline CLIP-based subspace analysis to separate content and style directions from paired data. During inference, it removes content-related components from the style reference and style-related components from the content reference to reduce leakage. It then injects style information through residual cross-attention and applies uncertainty-aware guidance to adapt the guidance signal at each denoising step. Experiments show that TRACE achieves a favorable trade-off between stylization and preservation. Compared with optimal-control-based baselines, TRACE substantially improves style fidelity (+17.28 CSD and +34.10 SRA). While, compared with stylization methods, it better preserves content structure (+12.80 DINO, +5.52 CLIP-I, and -8.19 LPIPS) and reduces directional semantic leakage by 29.5% in DCL. Our code is publicly available at https://github.com/pixelchemy-research/TRACE.
Duc Khoan Le, Kim Ngoc Tran, Minh Nhat Le +5
Faculty of Information Technology, University of Science, Ho Chi Minh City, Vietnam · Vietnam National University, Ho Chi Minh City, Vietnam
Style transfer applies the appearance of a reference image to a content image while preserving its spatial structure. Recent diffusion-based methods achieve strong stylization but typically assume a single global style. We instead consider regional-multi style transfer, which assigns multiple references to user-specified regions of a content image. Extending them to this setting reveals two coupled shared-attention issues: ambiguous mass allocation among content and style partitions and degraded selectivity as more styles are jointly normalized, while style aggregation at the attention output further suppresses fine details. We propose MAST (Mask-Guided Attention Control for Training-Free Regional-Multi Style Transfer), a unified attention-control framework for frozen diffusion models. Logit-level Attention Mass Allocation enforces mask-derived partition masses, Sharpness-aware Temperature Scaling adaptively restores selectivity, and Discrepancy-aware Detail Injection recovers high-frequency content. MAST jointly processes all style--mask pairs in a single denoising pass without training, optimization, or post-hoc composition. Across two to five styles, MAST achieves the best average ArtFID, FID, and R-FID among all baselines, demonstrating regional style fidelity, content preservation, and scalability.
Dongkyung Kang, Jaeyeon Hwang, Junseo Park +6
Department of Computer Science & Artificial Intelligence, Dongguk University
Reference-guided diffusion stylization aims to transfer visual style from a reference image while preserving the semantics specified by a text prompt. However, image conditioning often entangles transferable style cues with reference-specific content, leading to an inherent trade-off: stronger conditioning improves style fidelity but increases content leakage, whereas aggressive suppression reduces leakage at the cost of style expression. This challenge is further complicated by the distinct spatial organization of texture- and geometry-dominant styles. To address these issues, we propose SafeStyle, a training-free framework for calibrated style residual injection in frozen diffusion models. SafeStyle first estimates style-supported and content-associated subspaces from compact calibration sets, preserving their informative overlap while suppressing useless content variations. It then transports the purified style evidence over adaptive spatial granularity and constrains its effective influence through an explicit residual-norm budget. Experiments across texture- and geometry-dominant styles show that SafeStyle achieves a DINO style similarity of 0.432 while maintaining competitive text alignment. On a semantically disjoint leakage-stress benchmark, it further achieves a DINO style similarity of 0.474 with only 0.8% semantic leakage, demonstrating an effective balance between style fidelity and reference-content suppression.
Zhangping Yang, Min Li, Song Yan +4
Xi’an High-tech Research Institute, Shaanxi, China · University of Science and Technology of China, Anhui, China · Xi’an University of Architecture and Technology, Shaanxi, China