dariooo512 commited on
Commit
aeade0b
·
verified ·
1 Parent(s): ff8dda5

Upload 4 files

Browse files
Files changed (4) hide show
  1. conditioning_images.zip +3 -0
  2. diffusion2.py +101 -0
  3. images.zip +3 -0
  4. train.jsonl +100 -0
conditioning_images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f35dce50014405d2b0e2071eef6f634630eb9059b57819291e8a09f98d93b17
3
+ size 13718675
diffusion2.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from huggingface_hub import hf_hub_url
3
+ import datasets
4
+ import os
5
+
6
+ _VERSION = datasets.Version("0.0.2")
7
+
8
+ _DESCRIPTION = "TODO"
9
+ _HOMEPAGE = "TODO"
10
+ _LICENSE = "TODO"
11
+ _CITATION = "TODO"
12
+
13
+ _FEATURES = datasets.Features(
14
+ {
15
+ "image": datasets.Image(),
16
+ "conditioning_image": datasets.Image(),
17
+ "text": datasets.Value("string"),
18
+ },
19
+ )
20
+
21
+ METADATA_URL = hf_hub_url(
22
+ "diffusion2.py",
23
+ filename="train.jsonl",
24
+ repo_type="dataset",
25
+ )
26
+
27
+ IMAGES_URL = hf_hub_url(
28
+ "diffusion2.py",
29
+ filename="images.zip",
30
+ repo_type="dataset",
31
+ )
32
+
33
+ CONDITIONING_IMAGES_URL = hf_hub_url(
34
+ "diffusion2.py",
35
+ filename="conditioning_images.zip",
36
+ repo_type="dataset",
37
+ )
38
+
39
+ _DEFAULT_CONFIG = datasets.BuilderConfig(name="default", version=_VERSION)
40
+
41
+
42
+ class Fill50k(datasets.GeneratorBasedBuilder):
43
+ BUILDER_CONFIGS = [_DEFAULT_CONFIG]
44
+ DEFAULT_CONFIG_NAME = "default"
45
+
46
+ def _info(self):
47
+ return datasets.DatasetInfo(
48
+ description=_DESCRIPTION,
49
+ features=_FEATURES,
50
+ supervised_keys=None,
51
+ homepage=_HOMEPAGE,
52
+ license=_LICENSE,
53
+ citation=_CITATION,
54
+ )
55
+
56
+ def _split_generators(self, dl_manager):
57
+ metadata_path = dl_manager.download(METADATA_URL)
58
+ images_dir = dl_manager.download_and_extract(IMAGES_URL)
59
+ conditioning_images_dir = dl_manager.download_and_extract(
60
+ CONDITIONING_IMAGES_URL
61
+ )
62
+
63
+ return [
64
+ datasets.SplitGenerator(
65
+ name=datasets.Split.TRAIN,
66
+ # These kwargs will be passed to _generate_examples
67
+ gen_kwargs={
68
+ "metadata_path": metadata_path,
69
+ "images_dir": images_dir,
70
+ "conditioning_images_dir": conditioning_images_dir,
71
+ },
72
+ ),
73
+ ]
74
+
75
+ def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir):
76
+ metadata = pd.read_json(metadata_path, lines=True)
77
+
78
+ for _, row in metadata.iterrows():
79
+ text = row["text"]
80
+
81
+ image_path = row["image"]
82
+ image_path = os.path.join(images_dir, image_path)
83
+ image = open(image_path, "rb").read()
84
+
85
+ conditioning_image_path = row["conditioning_image"]
86
+ conditioning_image_path = os.path.join(
87
+ conditioning_images_dir, row["conditioning_image"]
88
+ )
89
+ conditioning_image = open(conditioning_image_path, "rb").read()
90
+
91
+ yield row["image"], {
92
+ "text": text,
93
+ "image": {
94
+ "path": image_path,
95
+ "bytes": image,
96
+ },
97
+ "conditioning_image": {
98
+ "path": conditioning_image_path,
99
+ "bytes": conditioning_image,
100
+ },
101
+ }
images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c915bab27b4616cdaf21d9d7c060960ccd9606a904078a62cdcfe210616c8bde
3
+ size 13965335
train.jsonl ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/0.png", "conditioning_image": "conditioning_images/0.png"}
2
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/1.png", "conditioning_image": "conditioning_images/1.png"}
3
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/2.png", "conditioning_image": "conditioning_images/2.png"}
4
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/3.png", "conditioning_image": "conditioning_images/3.png"}
5
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/4.png", "conditioning_image": "conditioning_images/4.png"}
6
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/5.png", "conditioning_image": "conditioning_images/5.png"}
7
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/6.png", "conditioning_image": "conditioning_images/6.png"}
8
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/7.png", "conditioning_image": "conditioning_images/7.png"}
9
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/8.png", "conditioning_image": "conditioning_images/8.png"}
10
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/9.png", "conditioning_image": "conditioning_images/9.png"}
11
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/10.png", "conditioning_image": "conditioning_images/10.png"}
12
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/11.png", "conditioning_image": "conditioning_images/11.png"}
13
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/12.png", "conditioning_image": "conditioning_images/12.png"}
14
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/13.png", "conditioning_image": "conditioning_images/13.png"}
15
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/14.png", "conditioning_image": "conditioning_images/14.png"}
16
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/15.png", "conditioning_image": "conditioning_images/15.png"}
17
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/16.png", "conditioning_image": "conditioning_images/16.png"}
18
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/17.png", "conditioning_image": "conditioning_images/17.png"}
19
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/18.png", "conditioning_image": "conditioning_images/18.png"}
20
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/19.png", "conditioning_image": "conditioning_images/19.png"}
21
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/20.png", "conditioning_image": "conditioning_images/20.png"}
22
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/21.png", "conditioning_image": "conditioning_images/21.png"}
23
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/22.png", "conditioning_image": "conditioning_images/22.png"}
24
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/23.png", "conditioning_image": "conditioning_images/23.png"}
25
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/24.png", "conditioning_image": "conditioning_images/24.png"}
26
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/25.png", "conditioning_image": "conditioning_images/25.png"}
27
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/26.png", "conditioning_image": "conditioning_images/26.png"}
28
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/27.png", "conditioning_image": "conditioning_images/27.png"}
29
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/28.png", "conditioning_image": "conditioning_images/28.png"}
30
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/29.png", "conditioning_image": "conditioning_images/29.png"}
31
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/30.png", "conditioning_image": "conditioning_images/30.png"}
32
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/31.png", "conditioning_image": "conditioning_images/31.png"}
33
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/32.png", "conditioning_image": "conditioning_images/32.png"}
34
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/33.png", "conditioning_image": "conditioning_images/33.png"}
35
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/34.png", "conditioning_image": "conditioning_images/34.png"}
36
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/35.png", "conditioning_image": "conditioning_images/35.png"}
37
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/36.png", "conditioning_image": "conditioning_images/36.png"}
38
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/37.png", "conditioning_image": "conditioning_images/37.png"}
39
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/38.png", "conditioning_image": "conditioning_images/38.png"}
40
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/39.png", "conditioning_image": "conditioning_images/39.png"}
41
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/40.png", "conditioning_image": "conditioning_images/40.png"}
42
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/41.png", "conditioning_image": "conditioning_images/41.png"}
43
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/42.png", "conditioning_image": "conditioning_images/42.png"}
44
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/43.png", "conditioning_image": "conditioning_images/43.png"}
45
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/44.png", "conditioning_image": "conditioning_images/44.png"}
46
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/45.png", "conditioning_image": "conditioning_images/45.png"}
47
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/46.png", "conditioning_image": "conditioning_images/46.png"}
48
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/47.png", "conditioning_image": "conditioning_images/47.png"}
49
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/48.png", "conditioning_image": "conditioning_images/48.png"}
50
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/49.png", "conditioning_image": "conditioning_images/49.png"}
51
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/50.png", "conditioning_image": "conditioning_images/50.png"}
52
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/51.png", "conditioning_image": "conditioning_images/51.png"}
53
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/52.png", "conditioning_image": "conditioning_images/52.png"}
54
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/53.png", "conditioning_image": "conditioning_images/53.png"}
55
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/54.png", "conditioning_image": "conditioning_images/54.png"}
56
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/55.png", "conditioning_image": "conditioning_images/55.png"}
57
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/56.png", "conditioning_image": "conditioning_images/56.png"}
58
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/57.png", "conditioning_image": "conditioning_images/57.png"}
59
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/58.png", "conditioning_image": "conditioning_images/58.png"}
60
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/59.png", "conditioning_image": "conditioning_images/59.png"}
61
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/60.png", "conditioning_image": "conditioning_images/60.png"}
62
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/61.png", "conditioning_image": "conditioning_images/61.png"}
63
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/62.png", "conditioning_image": "conditioning_images/62.png"}
64
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/63.png", "conditioning_image": "conditioning_images/63.png"}
65
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/64.png", "conditioning_image": "conditioning_images/64.png"}
66
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/65.png", "conditioning_image": "conditioning_images/65.png"}
67
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/66.png", "conditioning_image": "conditioning_images/66.png"}
68
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/67.png", "conditioning_image": "conditioning_images/67.png"}
69
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/68.png", "conditioning_image": "conditioning_images/68.png"}
70
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/69.png", "conditioning_image": "conditioning_images/69.png"}
71
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/70.png", "conditioning_image": "conditioning_images/70.png"}
72
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/71.png", "conditioning_image": "conditioning_images/71.png"}
73
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/72.png", "conditioning_image": "conditioning_images/72.png"}
74
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/73.png", "conditioning_image": "conditioning_images/73.png"}
75
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/74.png", "conditioning_image": "conditioning_images/74.png"}
76
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/75.png", "conditioning_image": "conditioning_images/75.png"}
77
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/76.png", "conditioning_image": "conditioning_images/76.png"}
78
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/77.png", "conditioning_image": "conditioning_images/77.png"}
79
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/78.png", "conditioning_image": "conditioning_images/78.png"}
80
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/79.png", "conditioning_image": "conditioning_images/79.png"}
81
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/80.png", "conditioning_image": "conditioning_images/80.png"}
82
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/81.png", "conditioning_image": "conditioning_images/81.png"}
83
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/82.png", "conditioning_image": "conditioning_images/82.png"}
84
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/83.png", "conditioning_image": "conditioning_images/83.png"}
85
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/84.png", "conditioning_image": "conditioning_images/84.png"}
86
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/85.png", "conditioning_image": "conditioning_images/85.png"}
87
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/86.png", "conditioning_image": "conditioning_images/86.png"}
88
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/87.png", "conditioning_image": "conditioning_images/87.png"}
89
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/88.png", "conditioning_image": "conditioning_images/88.png"}
90
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/89.png", "conditioning_image": "conditioning_images/89.png"}
91
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/90.png", "conditioning_image": "conditioning_images/90.png"}
92
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/91.png", "conditioning_image": "conditioning_images/91.png"}
93
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/92.png", "conditioning_image": "conditioning_images/92.png"}
94
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/93.png", "conditioning_image": "conditioning_images/93.png"}
95
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/94.png", "conditioning_image": "conditioning_images/94.png"}
96
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/95.png", "conditioning_image": "conditioning_images/95.png"}
97
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/96.png", "conditioning_image": "conditioning_images/96.png"}
98
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/97.png", "conditioning_image": "conditioning_images/97.png"}
99
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/98.png", "conditioning_image": "conditioning_images/98.png"}
100
+ {"text": "Draw the trajectory from the white tool to the wooden cube", "image": "images/99.png", "conditioning_image": "conditioning_images/99.png"}