nielsr's picture
nielsr HF Staff
Improve model card: add metadata, paper link, and usage instructions
acf2bc7 verified
|
Raw
History Blame
3.06 kB
---
base_model: Qwen/Qwen-Image-Edit
tags:
- lora
- image-editing
- cref
- sref
pipeline_tag: image-to-image
license: cc-by-nc-4.0
---
# FreeStyle: Free Control of Style-Content Dual-Reference Generation from Community LoRA Mining
FreeStyle is a scalable dual-reference generation framework that allows for synthesizing images by combining the structure and semantics of a content reference with the style of a separate reference image. It leverages community LoRA weights as compositional anchors and introduces mechanisms like attention-level enrichment constraints and frequency-aware RoPE modulation to prevent content leakage from style references.
- **Paper:** [FreeStyle: Free Control of Style-Content Dual-Reference Generation from Community LoRA Mining](https://huggingface.co/papers/2606.20506)
- **Project Page:** [https://blue2giant.github.io/FreeStyle/](https://blue2giant.github.io/FreeStyle/)
- **GitHub Repository:** [https://github.com/Blue2Giant/FreeStyle](https://github.com/Blue2Giant/FreeStyle)
## FreeStyle Checkpoints
This repository contains LoRA checkpoints for FreeStyle CRef/SRef image editing.
| Folder | What it is | Inference note |
| --- | --- | --- |
| `freestyle-sref-14000-no-rope/` | SRef-only checkpoint at step 14000. | Style-reference weights only. Use the standard non-RoPE inference path. |
| `freestyle-cref-sref-36000-no-rope/` | Joint CRef + SRef checkpoint at step 36000. | Use the standard non-RoPE inference path. |
| `freestyle-cref-sref-40000-rope/` | Joint CRef + SRef checkpoint at step 40000. | This checkpoint must be used with the RoPE-modulated inference script. Using a non-RoPE inference script can give incorrect results. |
Each folder contains a `model.safetensors` LoRA weight file.
## Sample Usage
To generate an image using the FreeStyle model, you can use the inference script provided in the [official GitHub repository](https://github.com/Blue2Giant/FreeStyle).
```bash
cd model_infer
# Follow environment setup instructions in the GitHub repository
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
```
## Citation
```bibtex
@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}
}
```
## Disclaimer
This project is released **strictly for academic research and non-commercial use only**. Users are responsible for ensuring that their use of this project complies with all applicable laws and third-party terms of service.