wenyii commited on
Commit
1795deb
·
verified ·
1 Parent(s): 3f5a035

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,6 +1,5 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
  *.bin filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
6
  *.ckpt filter=lfs diff=lfs merge=lfs -text
@@ -58,3 +57,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
 
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
  *.bz2 filter=lfs diff=lfs merge=lfs -text
5
  *.ckpt filter=lfs diff=lfs merge=lfs -text
 
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
+ json/train_ipadapter_wo_prompt_new_7_2.json filter=lfs diff=lfs merge=lfs -text
61
+ json/train_ipadapter_wo_prompt_new_7_2_coco.json filter=lfs diff=lfs merge=lfs -text
62
+ json/train_ipadapter_wo_prompt_new_7_2_11_14.json filter=lfs diff=lfs merge=lfs -text
63
+ json/coco.json filter=lfs diff=lfs merge=lfs -text
64
+ json/diffusiondb.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+
4
+
5
+ We provide two prompt sources (`diffusiondb` and `coco`) and two metadata formats (`json` and `pkl`).
6
+ Image files are stored in the corresponding `diffusiondb/` and `coco/` folders.
7
+
8
+
9
+
10
+ | Path | Description |
11
+ |------|-------------|
12
+ | `coco/` | image files (e.g., `coco/...png`) |
13
+ | `diffusiondb/` | image files (e.g., `diffusiondb/...png`) |
14
+ | `json/coco.json` | One JSON object per user (COCO split) |
15
+ | `json/diffusiondb.json` | One JSON object per user (DiffusionDB split) |
16
+ | `pkl/coco.pkl` | PKL grouping used by PrefDisc-style trainers (see below) |
17
+ | `pkl/diffusiondb.pkl` | Same for DiffusionDB |
18
+
19
+ ## Images
20
+ Extract image files with:
21
+ ```
22
+ cat coco.tar.part-* | tar -xf - -C coco
23
+ cat diffusiondb.tar.part-* | tar -xf - -C diffusiondb
24
+ ```
25
+
26
+
27
+ ## JSON
28
+
29
+ Each JSON file is a list of per-user records.
30
+ Each record is a dictionary with the following fields:
31
+
32
+ - **`image_file`**: path to the **target** image (training reconstruction target), e.g. `coco/0000102215_0000066902.png`.
33
+ - **`text`**: caption for the target image.
34
+ - **`negative_img`**: list of paths to **dispreferred** reference images.
35
+ - **`positive_img`**: list of paths to **preferred** reference images.
36
+ - **`prompt_list`**: list of prompts for the reference images.
37
+
38
+ For each record, `negative_img`, `positive_img`, and `prompt_list` are index-aligned and have the same length.
39
+
40
+ Example (abbreviated):
41
+
42
+ ```json
43
+ {
44
+ "id": "0",
45
+ "image_file": "diffusiondb/18869_0000001.png",
46
+ "text": "pink, blue, despair personified, artwork",
47
+ "negative_img": ["diffusiondb/18863_0036541.png", "..."],
48
+ "positive_img": ["diffusiondb/18863_0000001.png", "..."],
49
+ "prompt_list": ["...", "..."]
50
+ }
51
+ ```
52
+
53
+
54
+ ## PKL
55
+
56
+ Each PKL file is a dict keyed by user.
57
+ Each value is a **list** that stores one user's reference pairs and attributes.
58
+
59
+ This PKL format contains the same preference information as JSON:
60
+ reference pairs (`negative_img`, `positive_img`, `prompt_list`) plus
61
+ `negative_attributes` and `positive_attributes`.
62
+
63
+ - For each reference pair: **`(negative_filename, positive_filename, prompt)`**
64
+ (filenames can be joined with `coco/` or `diffusiondb/` under the dataset root).
65
+ - The **last** element of the list is **`[negative_attributes, positive_attributes]`**.
66
+
67
+ In short, the value format is:
68
+ `[(neg_img1, pos_img1, prompt1), (neg_img2, pos_img2, prompt2), ..., [neg_attr, pos_attr]]`.
69
+
70
+ Example:
71
+
72
+ ```python
73
+ import pickle
74
+
75
+ with open("diffusiondb.pkl", "rb") as f:
76
+ data = pickle.load(f)
77
+
78
+ sample_user = data[3]
79
+ print(sample_user)
80
+ ```
81
+
82
+ Output:
83
+
84
+ ```text
85
+ [("145191_0004851.png", "145191_0000007.png", "a human chest burster coming out of a xenomorph"), ..., ["Academic Art ...", "Abstract Expressionism ..."]]
86
+ ```
87
+
88
+
coco.tar.part-00000 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f0d88a59bf59920a060b3577ebb111514cf9f3db91ae47e653f666cc3b48e52
3
+ size 4294967296
coco.tar.part-00001 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b58b717e45b6ccb7b21961de5a2bf451bf075dc7ed32b1f189c27e987f34e1c1
3
+ size 4294967296
coco.tar.part-00002 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00fb9d4da6a6a894a40c058fa85608b931d00fb3efd64d4201b6c432d30b466c
3
+ size 4294967296
coco.tar.part-00003 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f703e2cf87a16bd1c7a976861cf9f8e86cce67b7770b51b385627af82909171f
3
+ size 3618639872
diffusiondb.tar.part-00000 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a7fa56c626ab37087cd6dda6b160c47dbbd3a02af22c03979fd7dd73ba0cd21
3
+ size 4294967296
diffusiondb.tar.part-00001 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57e236b40844af1df3d5eee9a585237f299281fe50bf99e1990e1dd2229125c7
3
+ size 4294967296
diffusiondb.tar.part-00002 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4024f1c3dd23379a0ebeb13e44251533c3358e34610dcb3c8dd07cc4a3a8006
3
+ size 4294967296
diffusiondb.tar.part-00003 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d0453dfdae2b4c268592bdd42fc7d2f7cd982a9e3d067c213626ff40ef51f2e
3
+ size 4294967296
diffusiondb.tar.part-00004 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:148d39d4ee37e126ca1ba85928efee49c65b528ea2a5656f4be991237ecbd3eb
3
+ size 4294967296
diffusiondb.tar.part-00005 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6251d8ee7db8b0c7bdaf0f290abb6ec34cb8622ef9441073bf60f3197a3ec999
3
+ size 2540666880
json/coco.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0bb3db56a21a94f43232c875908f4cdb656b0b42a4d6c3daacc9db0635753da
3
+ size 25735367
json/diffusiondb.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f768158948ffa9ba54109bcb787b0775f2f711250dda37456c0daefce11b1812
3
+ size 95849121
pkl/coco.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18cc9ac649755656504824455a781a363be18c738a92a16f77f4fcba14237f6d
3
+ size 283877694
pkl/diffusiondb.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afb75b283647bc75a9cfe7e7d504429369c252165bdfb3459073861843a282c4
3
+ size 283636143