FreeStyle_Dataset / README.md
nielsr's picture
nielsr HF Staff
Link paper, project page and improve metadata
b64e35e verified
|
Raw History Blame
4.47 kB
metadata
language:
  - en
  - zh
task_categories:
  - image-to-image
pretty_name: FreeStyle CRef/SRef LoRA Triplet Dataset
license: cc-by-nc-4.0
tags:
  - style-transfer
  - diffusion
  - lora
  - dual-reference-generation

FreeStyle: Free Control of Style-Content Dual-Reference Generation from Community LoRA Mining

Project Page | Paper | GitHub

This dataset contains CRef/SRef LoRA triplets exported from the 0426 diffusion training data. It was introduced as part of FreeStyle, a scalable dual-reference generation framework that treats community LoRAs as compositional anchors for style and content.

Each training example in this dataset consists of three images:

  • content: content reference image, used as cref_0
  • style: style reference image, used as sref_0
  • target: image generated from the combined content + style condition

Use triplets.csv as the main entry point. Image-level CSV files are provided only for deduplicated metadata and provenance lookup.

Sources

Directory Base model Original source Triplets
cref_sref/qwen/ qwen cref_sref_qwen_lora_part1 33,582
cref_sref/flux/ flux cref_sref_flux_lora_part1 273,682
cref_sref/illustrious/ illustrious cref_sref_illustrious_lora_part1 172,589

Layout

<repo-root>/
  README.md
  cref_sref/
    README.md
    qwen/
      triplets.csv
      content_images.csv
      style_images.csv
      target_images.csv
      images/content/...
      images/style/...
      images/target/...
    flux/
      ... same structure ...
    illustrious/
      ... same structure ...

How To Use

Pick one source directory and read its triplets.csv:

import csv
from pathlib import Path
from PIL import Image

source_dir = Path("/path/to/FreeStyle_Dataset/cref_sref/qwen")  # qwen / flux / illustrious

with open(source_dir / "triplets.csv", newline="", encoding="utf-8") as f:
    row = next(csv.DictReader(f))

content = Image.open(source_dir / row["content_image_path"]).convert("RGB")
style = Image.open(source_dir / row["style_image_path"]).convert("RGB")
target = Image.open(source_dir / row["target_image_path"]).convert("RGB")

print(row["sequence_id"])

# One training-compatible text pair. The original training samples one of several
# instruction/caption choices; see the next section.
instruction = row["vault_primary_instruction_en_123"]
target_caption = row["vault_captions_scene_3_en"]
print(instruction)
print(target_caption)

Which Prompt Fields Are Used For Training?

The 0426 training config uses the three lora-triplet sources: cref_sref_qwen_lora_part1, cref_sref_flux_lora_part1, and cref_sref_illustrious_lora_part1.

In the training loader, a sample is represented by:

<cref_0 image> <sref_0 image> <instruction text> <target caption text> <target image>

For these lora-triplet sources, the training DB provides 8 text choices per sequence. Each choice uses exactly one instruction field plus one target-caption field:

Instruction field Vault text index
vault_primary_instruction_en_123 primary_instruction_en_123
vault_primary_instruction_cn_123 primary_instruction_cn_123
vault_sample_instruction_en_123 sample_instruction_en_123
vault_sample_instruction_cn_123 sample_instruction_cn_123

paired with one of:

Target-caption field Vault text index
vault_captions_scene_3_en captions/scene_3_en
vault_captions_scene_3 captions/scene_3

Notes

  • Images are deduplicated; the same image file may appear in multiple triplet rows.
  • original_path and prompt fields are best-effort provenance metadata and may be unresolved for some rows.
  • For detailed column definitions and provenance status values, see cref_sref/README.md.

Citation

@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}
}