StyleExpert / README.md
nielsr's picture
nielsr HF Staff
Add model card metadata and usage instructions
e0a026e verified
|
raw
history blame
2.79 kB
---
license: cc-by-nc-4.0
pipeline_tag: image-to-image
tags:
- image-stylization
- mixture-of-experts
- lora
- flux
---
# StyleExpert: Mixture of Style Experts for Diverse Image Stylization
[StyleExpert](https://hh-lg.github.io/StyleExpert-Page/) is a semantic-aware framework for diverse image stylization based on a Mixture of Experts (MoE) architecture. It addresses the limitations of existing diffusion-based stylization methods by effectively handling complex semantics and material details, rather than just color-driven transformations.
[[๐Ÿ“– Paper](https://huggingface.co/papers/2603.16649)] [[๐Ÿ  Project Page](https://hh-lg.github.io/StyleExpert-Page/)] [[๐Ÿ’ป Code](https://github.com/HVision-NKU/StyleExpert)]
![teaser](https://github.com/HVision-NKU/StyleExpert/raw/main/assets/figures/teaser.png)
## Model Description
StyleExpert employs a unified style encoder trained on the **StyleExpert-40K** dataset (40,000 content-style-stylized triplets). The model uses a similarity-aware gating mechanism to dynamically route styles to specialized experts within the MoE architecture, allowing it to handle styles ranging from shallow textures to deep semantics.
## Installation
We recommend using **Python 3.10** and **PyTorch** with CUDA support.
```bash
# Create a new conda environment
conda create -n styleexpert python=3.10
conda activate styleexpert
# Install requirements
pip install -r requirements.txt
```
## Quick Inference
### Local Gradio Demo
You can run a local web interface to interact with the model:
```bash
python app.py
```
### Single Case Inference via CLI
To stylize a single image using a reference style, use the following command from the [official repository](https://github.com/HVision-NKU/StyleExpert):
```bash
python infer.py --content_path ./data/content.jpg --style_path ./data/style.jpg
```
### Weights Download
The model requires the base **FLUX.1-Kontext-dev** and the **StyleExpert** adapters. You can use the provided script in the GitHub repo to download all necessary components:
```bash
bash download_models.sh --token YOUR_HF_TOKEN
```
## Visual Results
![compare](https://github.com/HVision-NKU/StyleExpert/raw/main/assets/figures/compare.png)
## Citation
If StyleExpert helps your research, please cite the following work:
```bibtex
@article{zhu2026styleexpert,
title={Mixture of Style Experts for Diverse Image Stylization},
author={Zhu, Shihao and Ouyang, Ziheng and Kang, Yijia and Wang, Qilong and Zhou, Mi and Li, Bo and Cheng, Ming-Ming and Hou, Qibin},
journal={CVPR},
year={2026}
}
```
## License
This model is licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) for non-commercial use. Underlying model weights (like FLUX.1) may be subject to their own respective licenses.