Blue2Giant commited on
Commit
fc89e46
·
verified ·
1 Parent(s): 5f24a36

Add files using upload-large-folder tool

Browse files
Files changed (1) hide show
  1. cref_sref/README.md +25 -205
cref_sref/README.md CHANGED
@@ -1,205 +1,25 @@
1
- # 0426 Lora Triplet Dataset
2
-
3
- This directory contains the normalized export of the lora-triplet portion of:
4
-
5
- - `/data/vgo/xingpeng/new_vgo/Sref_Cref_MiniVGO/configs/data/0426_cref_sref_full_diffusion.yaml`
6
-
7
- It covers three nonzero-weight lora-triplet sources:
8
-
9
- - `cref_sref_qwen_lora_part1`
10
- - `cref_sref_flux_lora_part1`
11
- - `cref_sref_illustrious_lora_part1`
12
-
13
- ## Directory Layout
14
-
15
- For the Hugging Face release, the dataset card stays at repository root and the exported data is placed under `cref_sref/`:
16
-
17
- ```text
18
- <repo-root>/
19
- README.md
20
- cref_sref/
21
- HF_UPLOAD_CHECKLIST.md
22
- README.md
23
- qwen/
24
- flux/
25
- illustrious/
26
- ```
27
-
28
- The working export root may also contain `logs/`. That directory is internal and can be excluded from the Hugging Face upload.
29
-
30
- Each source subdirectory under `cref_sref/` has the same structure:
31
-
32
- ```text
33
- <source-name>/
34
- README.md
35
- summary.json
36
- triplets.csv
37
- content_images.csv
38
- style_images.csv
39
- target_images.csv
40
- images/
41
- content/...
42
- style/...
43
- target/...
44
- _state/
45
- manifest.json
46
- triplets.jsonl
47
- content_images.jsonl
48
- style_images.jsonl
49
- target_images.jsonl
50
- ```
51
-
52
- ## What A Triplet Means
53
-
54
- Each triplet row corresponds to one vault training sequence and three training images:
55
-
56
- - `content`: the image used for `cref_0`
57
- - `style`: the image used for `sref_0`
58
- - `target`: the image used for the combined content+style target
59
-
60
- So the key relationship is:
61
-
62
- - `triplets.csv` = one row per training sequence
63
- - `content_images.csv` = one row per unique content image
64
- - `style_images.csv` = one row per unique style image
65
- - `target_images.csv` = one row per unique target image
66
-
67
- The images are deduplicated. The same exported image path can appear in many triplet rows.
68
-
69
- ## How To Read The Files
70
-
71
- ### 1. `triplets.csv`
72
-
73
- Use this file when you want to understand the training example itself.
74
-
75
- Important columns:
76
-
77
- - `sequence_id`: unique id of the vault sequence
78
- - `base_model`: one of `qwen`, `flux`, `illustrious`
79
- - `pair_key`: pair identifier
80
- - `content_model_id`
81
- - `style_model_id`
82
- - `content_image_path`
83
- - `style_image_path`
84
- - `target_image_path`
85
- - `content_original_path`
86
- - `style_original_path`
87
- - `target_original_path`
88
- - `content_match_status`
89
- - `style_match_status`
90
- - `target_match_status`
91
- - `content_prompt_status`
92
- - `style_prompt_status`
93
- - `target_prompt_status`
94
- - `content_generation_prompt`
95
- - `style_generation_prompt`
96
- - `target_generation_prompt`
97
- - `vault_texts_json`
98
-
99
- ### 2. `content_images.csv` / `style_images.csv` / `target_images.csv`
100
-
101
- Use these files when you want image-level metadata.
102
-
103
- Important columns:
104
-
105
- - `exported_image_path`: relative path under the source directory
106
- - `original_path`: recovered original generation image path when matched
107
- - `match_status`: whether original-path matching succeeded
108
- - `prompt_status`: whether the original generation prompt was recovered
109
- - `generation_prompt`
110
- - `base_prompt`
111
- - `sequence_count`: how many triplets reuse this exported image
112
- - `sequence_ids_json`: which triplets reuse this image
113
-
114
- ## How To View One Triplet
115
-
116
- ### Method 1: inspect one row from `triplets.csv`
117
-
118
- ```bash
119
- python3 - <<'PY'
120
- import csv
121
- path = '/path/to/repo/cref_sref/qwen/triplets.csv'
122
- with open(path, 'r', encoding='utf-8', newline='') as fh:
123
- row = next(csv.DictReader(fh))
124
- for key in [
125
- 'sequence_id',
126
- 'pair_key',
127
- 'content_image_path',
128
- 'style_image_path',
129
- 'target_image_path',
130
- 'content_match_status',
131
- 'style_match_status',
132
- 'target_match_status',
133
- 'content_generation_prompt',
134
- 'style_generation_prompt',
135
- 'target_generation_prompt',
136
- ]:
137
- print(f'{key}: {row[key]}')
138
- PY
139
- ```
140
-
141
- ### Method 2: load the three images for a given sequence
142
-
143
- ```bash
144
- python3 - <<'PY'
145
- import csv
146
- from pathlib import Path
147
-
148
- base = Path('/path/to/repo/cref_sref/qwen')
149
- with open(base / 'triplets.csv', 'r', encoding='utf-8', newline='') as fh:
150
- row = next(csv.DictReader(fh))
151
-
152
- print('sequence_id:', row['sequence_id'])
153
- print('content image:', base / row['content_image_path'])
154
- print('style image:', base / row['style_image_path'])
155
- print('target image:', base / row['target_image_path'])
156
- PY
157
- ```
158
-
159
- ### Method 3: join a triplet row to image-level metadata
160
-
161
- Join:
162
-
163
- - `triplets.csv.content_image_path` -> `content_images.csv.exported_image_path`
164
- - `triplets.csv.style_image_path` -> `style_images.csv.exported_image_path`
165
- - `triplets.csv.target_image_path` -> `target_images.csv.exported_image_path`
166
-
167
- This lets you answer:
168
-
169
- - Which triplets reuse the same image?
170
- - What is the recovered original path?
171
- - Was the original prompt recovered?
172
-
173
- ## How To Interpret Match And Prompt Status
174
-
175
- ### `match_status`
176
-
177
- - `matched`: exact visual-key match found in the original candidate pool
178
- - `unmatched`: candidate pool exists, but no exact unique match was found
179
- - `ambiguous`: more than one candidate matched the same visual key
180
- - `no_candidates`: no candidate pool was available for that lookup
181
-
182
- ### `prompt_status`
183
-
184
- - `resolved`: generation prompt metadata was recovered
185
- - `unmatched_original`: original image path was not matched
186
- - `missing_prompt_payload`: prompt sidecar json was missing
187
- - `missing_prompt_entry`: prompt file existed, but the specific image entry was missing
188
- - `missing_prompt_index`: image filename could not be mapped to a prompt index
189
-
190
- ## Important Semantics
191
-
192
- - Exported images are vault training images, not raw copies of original one-lora or dual-lora PNG files.
193
- - `original_path` and prompt recovery fields are best-effort provenance fields.
194
- - Some rows intentionally remain unmatched rather than risk incorrect prompt assignment.
195
- - `_state/` is internal resume state used during export; it is not required for ordinary dataset consumption.
196
-
197
- ## Source-Level Summary
198
-
199
- Final exported sequence counts:
200
-
201
- - `qwen`: `33,582`
202
- - `flux`: `273,682`
203
- - `illustrious`: `172,589`
204
-
205
- For detailed per-source match counts, see each source's `summary.json`.
 
1
+ # cref_sref
2
+
3
+ This directory is the Hugging Face payload for the 0426 lora-triplet release.
4
+
5
+ Contents:
6
+ - `qwen/`
7
+ - `flux/`
8
+ - `illustrious/`
9
+
10
+ Each source directory includes:
11
+ - `README.md`
12
+ - `summary.json`
13
+ - `triplets.csv`
14
+ - `content_images.csv`
15
+ - `style_images.csv`
16
+ - `target_images.csv`
17
+ - `images/`
18
+
19
+ Notes:
20
+ - `triplets.csv` is sequence-level.
21
+ - `*_images.csv` files are deduplicated image-level metadata.
22
+ - `_state/` is omitted from the public upload.
23
+ - `logs/` are omitted from the public upload.
24
+
25
+ Start with the source-level `README.md` and `triplets.csv`.