xiaohk commited on
Commit
e075e40
1 Parent(s): c919e37

Merge two config options

Browse files
Files changed (1) hide show
  1. diffusiondb.py +10 -1
diffusiondb.py CHANGED
@@ -64,7 +64,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
64
 
65
  # Programmatically generate configuration options (HF requires to use a string
66
  # as the config key)
67
- for num_k in [1, 5, 10, 50, 100, 500, 1000, 2000]:
68
  for sampling in ["first", "random"]:
69
  num_k_str = f"{num_k}k" if num_k < 1000 else f"{num_k // 1000}m"
70
 
@@ -98,6 +98,15 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
98
  ),
99
  )
100
 
 
 
 
 
 
 
 
 
 
101
  # Default to only load 1k random images
102
  DEFAULT_CONFIG_NAME = "random_1k"
103
 
 
64
 
65
  # Programmatically generate configuration options (HF requires to use a string
66
  # as the config key)
67
+ for num_k in [1, 5, 10, 50, 100, 500, 1000]:
68
  for sampling in ["first", "random"]:
69
  num_k_str = f"{num_k}k" if num_k < 1000 else f"{num_k // 1000}m"
70
 
 
98
  ),
99
  )
100
 
101
+ # For the 2k option, random sample and first parts are the same
102
+ BUILDER_CONFIGS.append(
103
+ DiffusionDBConfig(
104
+ name="all",
105
+ part_ids=_PART_IDS,
106
+ description="All images with their prompts and parameters",
107
+ ),
108
+ )
109
+
110
  # Default to only load 1k random images
111
  DEFAULT_CONFIG_NAME = "random_1k"
112