Official Repostitory of "FreeStyle: Free Control of Style Content Generation from Community LoRA Mining "
33
stars
22
commits
Python
primary language
Jun 24, 2026
updated
Jinghong Lan1,2*
Wei Cheng2*
Yunuo Chen2
Ziqi Ye1
Peng Xing2
Yixiao Fang2
Rui Wang2
Yufeng Yang2
Xuanyang Zhang2
Xianfang Zeng2
Difan Zou4
Gang Yu2‡
Chi Zhang3‡
1 Fudan University 2 StepFun 3 Westlake University 4 University of Hong Kong
* Equal contribution ‡ Corresponding authors
FreeStyle is a scalable, multi-reference image-generation data pipeline for both style reference and content reference. Its key insight is that the open-source community already hosts a vast collection of LoRA weights covering a rich and diverse range of content and style themes. Each LoRA can naturally be viewed as a clustering center for a style or a content concept, and because LoRAs are inherently composable — and can be further steered with prompts to inject rich visual semantics — they can be leveraged to obtain abundant dual-reference data. However, due to the inherent instability of LoRAs, a reliable data pipeline is needed to develop and exploit them. We implement this intricate pipeline and use it to train our own model.
On top of the data, FreeStyle contributes (1) a benchmark for SRef and CRef+SRef generation with a multi-dimensional evaluation protocol, and (2) a DiT-based model with an attention-level constraint and RoPE low-frequency modulation that suppresses style-reference content leakage while preserving style richness.
(content reference, style reference, text, target) triplets for content-and-style dual-reference generation — ~480K sequences (Flux 273,682 + Illustrious 172,589 + Qwen 33,582) spanning 1,704 styles — while the traditional SRef dataset targets pure style-reference generation with 619,302 sequences across 622 styles.
This repo is organized into three self-contained components. Each subfolder has its own detailed README — click through for full instructions.
| Component | Folder | What it provides | Docs |
|---|---|---|---|
| 🏭 LoRA Data Pipeline | lora_pipeline/ | Batch data production: mine community LoRAs and generate dual-reference triplets via a ComfyUI SDK across Flux / Qwen / Illustrious / SDXL, plus all mining metadata (model IDs, trigger words, prompt pools, workflows). | 📖 README |
| 📊 Benchmark Inference & Metrics | benchmark_infer/ | End-to-end benchmark toolkit: run inference for many baselines (FLUX, Qwen, TeleStyle, Seedream, CSGO, USO, OmniStyle), caption reference images, and compute all evaluation metrics. | 📖 README |
| 🎨 Model Inference | model_infer/ | Minimal inference demo for the FreeStyle model: two images + a prompt → generated image. Ships weight presets for SRef and CRef+SRef (with/without RoPE) and a Qwen3-VL recaption stage. | 📖 README |
We release the full stack behind FreeStyle:
| Resource | Description | Link |
|---|---|---|
| 🤗 Dataset | Large-scale style–content dual-reference triplets across multiple base models. | FreeStyle Dataset |
| 🤗 Benchmark | SRef & CRef+SRef evaluation sets (sref / cref_sref tasks). | FreeStyle Bench |
| 🤗 Model Weights | SRef and CRef+SRef checkpoints (with and without RoPE modulation). | FreeStyle Checkpoint |
| 🤗 LoRA Mining Metadata | Curated community LoRA IDs, verified trigger words, prompt pools, and ComfyUI workflows. | FreeStyle Lora Meta |
| 🌐 Project Page | Interactive results, comparisons, and qualitative galleries. | Project Page |
The benchmark inference scripts already reference a HuggingFace benchmark layout (
cref/,sref/,prompts.json, per-model outputs); seebenchmark_infer/README.mdfor the exact structure.
📩 Style-transfer data — available on request. The style-transfer subset of the dataset is not hosted publicly. To obtain it, please email ljh_sjtu@163.com to request access.
Pick the component you need — full setup lives in each subfolder README.
model_infer/)Two reference images + a prompt → one generated image.
cd model_infer
conda activate Sref
python3 cref_sref_core_infer.py \
assets/00-cref.jpg \
assets/00-sref.jpg \
'Transfer the style of image 2 onto image 1, keeping image 1's layout.' \
--weight_preset sref_14000 \
--recaption_task_type style_transfer \
--out_dir outputs/demo \
--steps 28 --cfg 8 --seed 42 --overwrite
lora_pipeline/)cd lora_pipeline
bash meta/comfyui_start_new_server.sh # launch ComfyUI on every GPU
python probe_comfy_ports.py --shell-file scripts/one_lora_flux.sh --start-port 8188 --port-count 8
bash scripts/one_lora_flux.sh # batch single-LoRA inference
→ See lora_pipeline/README.md for mining metadata, workflows, and dual-LoRA composition.
benchmark_infer/)cd benchmark_infer
conda create -n sref python=3.10 -y && conda activate sref
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
bash scripts/inference/uso_batch_run.sh # generate
bash scripts/metrics/uso_metric_batch.sh # one-stop evaluation
→ See benchmark_infer/README.md for model paths, the Qwen3-VL judge service, and metric details.
FreeStyle builds on the open-source community's LoRA ecosystem (Civitai, TensorArt, Liblib) and on excellent prior work including ComfyUI, ComfyKit, Qwen-Image / Qwen3-VL, FLUX, and the many style-transfer baselines compared in our benchmark (CSGO, USO, OmniStyle, TeleStyle, and others). In particular, we are grateful to the Qwen-Image-Edit team for open-sourcing such a powerful base model. We thank the creators of every mined LoRA whose contributions made this dataset possible.
This project, including all associated datasets, benchmarks, model weights, and code, is released strictly for academic research and non-commercial use only.
By accessing or using any part of this project, you acknowledge that you have read, understood, and agreed to this disclaimer.
If you find FreeStyle useful for your research, please consider citing:
@article{lan2026freestyle,
title = {FreeStyle: Free Control of Style-Content Dual-Reference Generation from Community LoRA Mining},
author = {Lan, Jinghong and Cheng, Wei and Chen, Yunuo and Ye, Ziqi and Xing, Peng and Fang, Yixiao and Wang, Rui and Yang, Yufeng and Zhang, Xuanyang and Zou, Difan and Zeng, Xianfang and Yu, Gang and Zhang, Chi},
journal = {arXiv preprint arXiv:2606.20506},
year = {2026}
}
14 commits
8 commits
Python
97.2%
Shell
2.8%
Official Repostitory of "FreeStyle: Free Control of Style Content Generation from Community LoRA Mining "
33
stars
22
commits
Python
primary language
Jun 24, 2026
updated
Jinghong Lan1,2*
Wei Cheng2*
Yunuo Chen2
Ziqi Ye1
Peng Xing2
Yixiao Fang2
Rui Wang2
Yufeng Yang2
Xuanyang Zhang2
Xianfang Zeng2
Difan Zou4
Gang Yu2‡
Chi Zhang3‡
1 Fudan University 2 StepFun 3 Westlake University 4 University of Hong Kong
* Equal contribution ‡ Corresponding authors
FreeStyle is a scalable, multi-reference image-generation data pipeline for both style reference and content reference. Its key insight is that the open-source community already hosts a vast collection of LoRA weights covering a rich and diverse range of content and style themes. Each LoRA can naturally be viewed as a clustering center for a style or a content concept, and because LoRAs are inherently composable — and can be further steered with prompts to inject rich visual semantics — they can be leveraged to obtain abundant dual-reference data. However, due to the inherent instability of LoRAs, a reliable data pipeline is needed to develop and exploit them. We implement this intricate pipeline and use it to train our own model.
On top of the data, FreeStyle contributes (1) a benchmark for SRef and CRef+SRef generation with a multi-dimensional evaluation protocol, and (2) a DiT-based model with an attention-level constraint and RoPE low-frequency modulation that suppresses style-reference content leakage while preserving style richness.
(content reference, style reference, text, target) triplets for content-and-style dual-reference generation — ~480K sequences (Flux 273,682 + Illustrious 172,589 + Qwen 33,582) spanning 1,704 styles — while the traditional SRef dataset targets pure style-reference generation with 619,302 sequences across 622 styles.
This repo is organized into three self-contained components. Each subfolder has its own detailed README — click through for full instructions.
| Component | Folder | What it provides | Docs |
|---|---|---|---|
| 🏭 LoRA Data Pipeline | lora_pipeline/ | Batch data production: mine community LoRAs and generate dual-reference triplets via a ComfyUI SDK across Flux / Qwen / Illustrious / SDXL, plus all mining metadata (model IDs, trigger words, prompt pools, workflows). | 📖 README |
| 📊 Benchmark Inference & Metrics | benchmark_infer/ | End-to-end benchmark toolkit: run inference for many baselines (FLUX, Qwen, TeleStyle, Seedream, CSGO, USO, OmniStyle), caption reference images, and compute all evaluation metrics. | 📖 README |
| 🎨 Model Inference | model_infer/ | Minimal inference demo for the FreeStyle model: two images + a prompt → generated image. Ships weight presets for SRef and CRef+SRef (with/without RoPE) and a Qwen3-VL recaption stage. | 📖 README |
We release the full stack behind FreeStyle:
| Resource | Description | Link |
|---|---|---|
| 🤗 Dataset | Large-scale style–content dual-reference triplets across multiple base models. | FreeStyle Dataset |
| 🤗 Benchmark | SRef & CRef+SRef evaluation sets (sref / cref_sref tasks). | FreeStyle Bench |
| 🤗 Model Weights | SRef and CRef+SRef checkpoints (with and without RoPE modulation). | FreeStyle Checkpoint |
| 🤗 LoRA Mining Metadata | Curated community LoRA IDs, verified trigger words, prompt pools, and ComfyUI workflows. | FreeStyle Lora Meta |
| 🌐 Project Page | Interactive results, comparisons, and qualitative galleries. | Project Page |
The benchmark inference scripts already reference a HuggingFace benchmark layout (
cref/,sref/,prompts.json, per-model outputs); seebenchmark_infer/README.mdfor the exact structure.
📩 Style-transfer data — available on request. The style-transfer subset of the dataset is not hosted publicly. To obtain it, please email ljh_sjtu@163.com to request access.
Pick the component you need — full setup lives in each subfolder README.
model_infer/)Two reference images + a prompt → one generated image.
cd model_infer
conda activate Sref
python3 cref_sref_core_infer.py \
assets/00-cref.jpg \
assets/00-sref.jpg \
'Transfer the style of image 2 onto image 1, keeping image 1's layout.' \
--weight_preset sref_14000 \
--recaption_task_type style_transfer \
--out_dir outputs/demo \
--steps 28 --cfg 8 --seed 42 --overwrite
lora_pipeline/)cd lora_pipeline
bash meta/comfyui_start_new_server.sh # launch ComfyUI on every GPU
python probe_comfy_ports.py --shell-file scripts/one_lora_flux.sh --start-port 8188 --port-count 8
bash scripts/one_lora_flux.sh # batch single-LoRA inference
→ See lora_pipeline/README.md for mining metadata, workflows, and dual-LoRA composition.
benchmark_infer/)cd benchmark_infer
conda create -n sref python=3.10 -y && conda activate sref
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
bash scripts/inference/uso_batch_run.sh # generate
bash scripts/metrics/uso_metric_batch.sh # one-stop evaluation
→ See benchmark_infer/README.md for model paths, the Qwen3-VL judge service, and metric details.
FreeStyle builds on the open-source community's LoRA ecosystem (Civitai, TensorArt, Liblib) and on excellent prior work including ComfyUI, ComfyKit, Qwen-Image / Qwen3-VL, FLUX, and the many style-transfer baselines compared in our benchmark (CSGO, USO, OmniStyle, TeleStyle, and others). In particular, we are grateful to the Qwen-Image-Edit team for open-sourcing such a powerful base model. We thank the creators of every mined LoRA whose contributions made this dataset possible.
This project, including all associated datasets, benchmarks, model weights, and code, is released strictly for academic research and non-commercial use only.
By accessing or using any part of this project, you acknowledge that you have read, understood, and agreed to this disclaimer.
If you find FreeStyle useful for your research, please consider citing:
@article{lan2026freestyle,
title = {FreeStyle: Free Control of Style-Content Dual-Reference Generation from Community LoRA Mining},
author = {Lan, Jinghong and Cheng, Wei and Chen, Yunuo and Ye, Ziqi and Xing, Peng and Fang, Yixiao and Wang, Rui and Yang, Yufeng and Zhang, Xuanyang and Zou, Difan and Zeng, Xianfang and Yu, Gang and Zhang, Chi},
journal = {arXiv preprint arXiv:2606.20506},
year = {2026}
}
14 commits
8 commits
Python
97.2%
Shell
2.8%