Skip to content

Commit

Permalink
Update hf_hub_url() call (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <jay@zijie.wang>
  • Loading branch information
xiaohk committed Nov 24, 2022
1 parent 530696f commit 9eb91c7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions scripts/diffusiondb.py
Expand Up @@ -47,28 +47,34 @@

for i in _PART_IDS:
_URLS[i] = hf_hub_url(
"datasets/poloclub/diffusiondb", filename=f"images/part-{i:06}.zip"
"poloclub/diffusiondb",
filename=f"images/part-{i:06}.zip",
repo_type="dataset",
)

for i in _PART_IDS_LARGE:
if i < 10001:
_URLS_LARGE[i] = hf_hub_url(
"datasets/poloclub/diffusiondb",
"poloclub/diffusiondb",
filename=f"diffusiondb-large-part-1/part-{i:06}.zip",
repo_type="dataset",
)
else:
_URLS_LARGE[i] = hf_hub_url(
"datasets/poloclub/diffusiondb",
"poloclub/diffusiondb",
filename=f"diffusiondb-large-part-2/part-{i:06}.zip",
repo_type="dataset",
)

# Add the metadata parquet URL as well
_URLS["metadata"] = hf_hub_url(
"datasets/poloclub/diffusiondb", filename="metadata.parquet"
"poloclub/diffusiondb", filename="metadata.parquet", repo_type="dataset"
)

_URLS_LARGE["metadata"] = hf_hub_url(
"datasets/poloclub/diffusiondb", filename="metadata-large.parquet"
"poloclub/diffusiondb",
filename="metadata-large.parquet",
repo_type="dataset",
)

_SAMPLER_DICT = {
Expand Down

0 comments on commit 9eb91c7

Please sign in to comment.