File size: 2,452 Bytes
230ca1b
fc89e46
230ca1b
fc89e46
230ca1b
fc89e46
230ca1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fc89e46
 
 
230ca1b
 
fc89e46
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
# `cref_sref` Payload Guide

This folder contains the content-reference/style-reference LoRA triplet payload for the FreeStyle dataset.

Start from the root [`README.md`](../README.md) for full usage examples. This file summarizes the payload layout.

## Sources

| Source | Triplet rows | Unique content images | Unique style images | Unique target images |
|---|---:|---:|---:|---:|
| `qwen` | 33,582 | 90 | 424 | 5,162 |
| `flux` | 273,682 | 482 | 13,037 | 129,237 |
| `illustrious` | 172,589 | 8,045 | 1,581 | 65,952 |

## Layout

Each source directory has the same structure:

```text
<source>/
  README.md
  summary.json
  triplets.csv
  content_images.csv
  style_images.csv
  target_images.csv
  images/
    content/...
    style/...
    target/...
```

`_state/` and `logs/` are intentionally not included in the public upload.

## How to Use

For a source such as `qwen`:

1. Read `qwen/triplets.csv`; it is the sequence-level index.
2. For each row, use:
   - `content_image_path`
   - `style_image_path`
   - `target_image_path`
3. Resolve those paths relative to `cref_sref/qwen/`.
4. Use `content_images.csv`, `style_images.csv`, and `target_images.csv` only when you need image-level metadata, reuse counts, original-path provenance, or prompt recovery details.

Minimal Python example:

```python
from huggingface_hub import hf_hub_download
from PIL import Image
import pandas as pd

repo_id = "Blue2Giant/FreeStyle_Dataset"
source = "qwen"

triplets = pd.read_csv(hf_hub_download(repo_id=repo_id, repo_type="dataset", filename=f"cref_sref/{source}/triplets.csv"))
row = triplets.iloc[0]

content_path = hf_hub_download(repo_id=repo_id, repo_type="dataset", filename=f"cref_sref/{source}/{row['content_image_path']}")
style_path = hf_hub_download(repo_id=repo_id, repo_type="dataset", filename=f"cref_sref/{source}/{row['style_image_path']}")
target_path = hf_hub_download(repo_id=repo_id, repo_type="dataset", filename=f"cref_sref/{source}/{row['target_image_path']}")

content = Image.open(content_path).convert("RGB")
style = Image.open(style_path).convert("RGB")
target = Image.open(target_path).convert("RGB")
```

## Notes

- `triplets.csv` is sequence-level.
- `*_images.csv` files are deduplicated image-level metadata.
- The same image can be reused by many triplets; check `sequence_count` in the image metadata tables.
- Prompt/provenance fields are best effort. Rows with unresolved provenance are intentionally preserved.