Image-to-Image
Diffusers
Safetensors
style-transfer
image-editing
controllable-generation
lora
stylecontroller
Instructions to use ReyChiaro/StyleController with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ReyChiaro/StyleController with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("ReyChiaro/StyleController") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
File size: 4,481 Bytes
2851b62 8eb2363 2851b62 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | ---
license: apache-2.0
library_name: diffusers
pipeline_tag: image-to-image
base_model: Qwen/Qwen-Image-Edit-2509
base_model_relation: adapter
datasets:
- ReyChiaro/SmoothStyle
tags:
- style-transfer
- image-editing
- controllable-generation
- lora
- safetensors
- stylecontroller
---
<p align="center">
<img src="figs/stylecontroller-banner.svg" alt="StyleController" width="100%">
</p>
<!-- <h1 align="center">StyleController</h1> -->
<h3 align="center">
Staying True to the Origin: Continuous Image Stylization with Smooth Transitions
</h3>
<p align="center">
Rui Xu Β· Hanmo Zhang Β· Songhua Liu<br>
Shanghai Jiao Tong University
</p>
<p align="center">
<a href="https://huggingface.co/datasets/ReyChiaro/SmoothStyle"><img alt="Hugging Face Dataset" src="https://img.shields.io/badge/%F0%9F%A4%97-Dataset-FFD21E?style=flat-square"></a>
<a href=""><img alt="Hugging Face Model" src="https://img.shields.io/badge/%F0%9F%A4%97-Model-FFD21E?style=flat-square"></a>
<a href=""><img alt="Project Page" src="https://img.shields.io/badge/Project-Page-CB8B65?style=flat-square&logo=githubpages&logoColor=white"></a>
<a href=""><img alt="arXiv" src="https://img.shields.io/badge/arXiv-Paper-B31B1B?style=flat-square&logo=arxiv&logoColor=white"></a>
<a href="https://github.com/ReyChiaro/StyleController"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-Code-181717?style=flat-square&logo=github&logoColor=white"></a>
</p>
StyleController is a controllable image-stylization adapter collection. Given a content image, a style reference, a text instruction, and a scalar strength, it generates stylized images while providing continuous control over the amount of transferred style.
This repository contains model weights only. Inference and training code are maintained in the [StyleController GitHub repository](https://github.com/ReyChiaro/StyleController).
## Available models
| Variant | Base model | Precision | Strength anchors | Status |
| --- | --- | --- | --- | --- |
| [`qwenimage_edit_2509`](qwenimage_edit_2509/) | [`Qwen/Qwen-Image-Edit-2509`](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) | BF16 | 0.1β0.9 | Available |
## Repository layout
```text
StyleController/
βββ README.md
βββ MODEL_CARD.md
βββ LICENSE
βββ NOTICE
βββ model_manifest.json
βββ qwenimage_edit_2509/
βββ README.md
βββ stylecontroller_config.json
βββ checksums.sha256
βββ styctrl_qwenimage_edit_2509.safetensors
βββ projectors/
βββ s01.safetensors
βββ ...
βββ s09.safetensors
```
## Download
Install the Hugging Face CLI and download the current variant:
```bash
pip install -U huggingface_hub
hf download ReyChiaro/StyleController \
--include "qwenimage_edit_2509/*" \
--local-dir hf_weights
```
## Inference
Clone and install the implementation:
```bash
git clone https://github.com/ReyChiaro/StyleController.git
cd StyleController
uv sync
```
Run Qwen-Image-Edit-2509 inference at strength `0.55`:
```bash
uv run python infer_styctrl.py \
--model qwen \
--pretrained-pipeline Qwen/Qwen-Image-Edit-2509 \
--content examples/content.jpg \
--style examples/style.jpg \
--prompt "Transfer the style of image 2 to image 1 while preserving the content structure." \
--strength 0.55 \
--output outputs/result_055.png \
--lora-checkpoint hf_weights/qwenimage_edit_2509/styctrl_qwenimage_edit_2509.safetensors \
--projector-checkpoints \
hf_weights/qwenimage_edit_2509/projectors/s01.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s02.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s03.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s04.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s05.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s06.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s07.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s08.safetensors \
hf_weights/qwenimage_edit_2509/projectors/s09.safetensors \
--anchor-strengths 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
```
## License
The model-weight release is provided under the [Apache License 2.0](LICENSE). The StyleController source code is separately licensed under MIT. The Qwen base model and SmoothStyle dataset remain governed by their own licenses and notices; see [`NOTICE`](NOTICE).
## Citation
|