Skip to content

Repository files navigation

StyDeco: Unsupervised Style Transfer with Distilling Priors and Semantic Decoupling [Official Code of PyTorch]

* Equal contribution.

Paper PDF     Project Page     Hugging Face    

🎉 News

2025.08: 🔥 The official code of StyDeco has been released.
• 2025.08: 🔥 The paper of StyDeco has been submitted to arXiv.

🎬 Overview

In this paper, we propose StyDeco, an unsupervised framework that resolves this limitation by learning text representations specifically tailored for the style transfer task. Our framework first employs Prior-Guided Data Distillation (PGD), a strategy designed to distill stylistic knowledge without human supervision. It leverages a powerful frozen generative model to automatically synthesize pseudopaired data. Subsequently, we introduce Contrastive Semantic Decoupling (CSD), a task-specific objective that adapts a text encoder using domain-specific weights. CSD performs a twoclass clustering in the semantic space, encouraging source and target representations to form distinct clusters. The overall framework is illustrated as follows: Overall Framework

🔧 Environment

git clone https://github.com/QuanjianSong/StyDeco.git
# Installation with the requirement.txt
conda create -n StyDeco python=3.10
conda activate StyDeco
pip install -r requirements.txt
# Or installation with environment.yaml
conda env create -f environment.yaml

🔥 Train

bash train_StyDeco.sh

🚀 Inference

bash start_StyDeco.sh

🎓 Bibtex

🤗 If you find this code helpful for your research, please cite:

@article{yang2025stydeco,
  title={StyDeco: Unsupervised Style Transfer with Distilling Priors and Semantic Decoupling},
  author={Yang, Yuanlin and Song, Quanjian and Gao, Zhexian and Wang, Ge and Li, Shanshan and Zhang, Xiaoyan},
  journal={arXiv preprint arXiv:2508.01215},
  year={2025}
}

About

Official Pytorch Code of the Paper "StyDeco: Unsupervised Style Transfer with Distilling Priors and Semantic Decoupling"

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages