xiaohk commited on
Commit
fb620fb
1 Parent(s): 4de7acd

Add a new subset for the data viewer

Browse files
Files changed (1) hide show
  1. diffusiondb.py +12 -0
diffusiondb.py CHANGED
@@ -232,6 +232,18 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
232
  ),
233
  )
234
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  # Default to only load 1k random images
236
  DEFAULT_CONFIG_NAME = "2m_random_1k"
237
 
 
232
  ),
233
  )
234
 
235
+ # Add a random 1k from 2M as the first entry point to show on HF data viewer
236
+ # Sample part_ids
237
+ part_ids = np.random.choice(_PART_IDS, 1000, replace=False).tolist()
238
+ BUILDER_CONFIGS.append(
239
+ DiffusionDBConfig(
240
+ name="1k_random_2m",
241
+ part_ids=part_ids,
242
+ is_large=False,
243
+ description="Another random 1k images with meta data from DiffusionDB 2M",
244
+ ),
245
+ )
246
+
247
  # Default to only load 1k random images
248
  DEFAULT_CONFIG_NAME = "2m_random_1k"
249