TRACE: Time-Adaptive Residual Attention Control with Content–Style Decomposition for Training-Free Diffusion Style Transfer
Duc Khoan Le1,2, Kim Ngoc Tran1,2, Minh Nhat Le1,2, Thanh An Tran1,2, Viet Toan Nguyen1,2, Khanh An Lay1,2, Tran Thai Son1,2, Hoang Pham Minh1,2
1 Faculty of Information Technology, University of Science, Ho Chi Minh City, Vietnam
2 Vietnam National University, Ho Chi Minh City, Vietnam
- Accepted at ACCV 2026: TRACE has been accepted for presentation at ACCV 2026.
- 2026.10.03: The TRACE paper is now available on arXiv.
- 2026.10.03: The official TRACE code has been released!
TRACE is a training-free framework for reference-guided diffusion style transfer. It is designed to balance three competing objectives: style fidelity, content preservation, and content leakage suppression.
Instead of treating stylization as a static feature-transfer operation, TRACE formulates the reverse diffusion process as a controlled trajectory and combines three components:
- 🧩 Content–Style Decomposition: learns content and style subspaces from paired CLIP embeddings to disentangle content from style in both references.
- 🎨 Residual Style Injection: injects a cleaned style residual additively rather than directly replacing the content-preserving attention trajectory.
- 📈 Uncertainty-Time Adaptive Guidance: estimates the reliability of the current denoising state and adaptively adjusts the style-guidance strength across reverse diffusion steps.
TRACE is compared with both stylization-oriented and optimal-control-based methods. Stylization methods often provide stronger appearance transfer but may distort content structure or introduce semantic information from the style reference, while optimal-control-based methods preserve content more conservatively but exhibit weaker stylization. TRACE aims to balance these two behaviors.
Run the following commands from the repository root:
# Create and activate the environment
conda create -n trace python=3.9 -y
conda activate trace
# Download pretrained Stable Cascade models
cd third_party/StableCascade/models
bash download_models.sh essential big-big bfloat16
cd ..
# Install Stable Cascade dependencies
pip install -r requirements.txt
pip install opencv-python matplotlib ftfy
cd ../..Download the pretrained CSD weights and place them at:
third_party/CSD/checkpoint.pth
The pre-computed content–style decomposition described in the paper is provided at:
decomposition/decomposition.pt
Place the content and style images under the data/ directory:
data/
├── content/
│ ├── content_01.jpg
│ ├── content_02.jpg
│ └── ...
└── style/
├── style_01.jpg
├── style_02.jpg
└── ...
The content–style pairs used for inference are specified in run_main.sh. The content and style images are processed as corresponding pairs according to their order.
To run the provided examples, simply execute:
bash run_main.shThe generated images will be saved in the samples/TRACE/ directory.
If you find TRACE useful for your research, please consider citing our paper:
@inproceedings{le2026trace,
title = {TRACE: Time-Adaptive Residual Attention Control with Content-Style Decomposition for Training-Free Diffusion Style Transfer},
author = {Duc Khoan Le and Kim Ngoc Tran and Minh Nhat Le and Thanh An Tran and Viet Toan Nguyen and Khanh An Lay and Tran Thai Son and Hoang Pham Minh},
booktitle = {Asian Conference on Computer Vision (ACCV)},
year = {2026}
}Our implementation builds upon StableCascade and CSD. We thank the authors for sharing their code and pretrained models.

