Skip to content

Commit

Permalink
Add a new subset to show it on HF data viewer
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <[email protected]>
  • Loading branch information
xiaohk committed Jan 22, 2024
1 parent 864881c commit 52c2349
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/diffusiondb.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,18 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
),
)

# Add a random 1k from 2M as the first entry point to show on HF data viewer
# Sample part_ids
part_ids = np.random.choice(_PART_IDS, 1000, replace=False).tolist()
BUILDER_CONFIGS.append(
DiffusionDBConfig(
name="1k_random_2m",
part_ids=part_ids,
is_large=False,
description="Another random 1k images with meta data from DiffusionDB 2M",
),
)

# Default to only load 1k random images
DEFAULT_CONFIG_NAME = "2m_random_1k"

Expand Down

0 comments on commit 52c2349

Please sign in to comment.