Datasets:
|
Download README.md from MGFlow/MGFlow-T2I: direct link, hf CLI and curl.
- Browser
- Download file 3.57 kB
-
https://huggingface.co/datasets/MGFlow/MGFlow-T2I/resolve/main/README.md
- Command line
-
hf download hf://datasets/MGFlow/MGFlow-T2I/README.md
-
curl -L -o README.md https://huggingface.co/datasets/MGFlow/MGFlow-T2I/resolve/main/README.md
3.57 kB
| license: cc-by-4.0 | |
| pretty_name: MGFlow-T2I | |
| language: | |
| - en | |
| task_categories: | |
| - text-to-image | |
| size_categories: | |
| - 100K<n<1M | |
| tags: | |
| - mgflow | |
| - synthetic | |
| - image | |
| - text | |
| - webdataset | |
| # MGFlow-T2I | |
| **Anonymous dataset release for ICLR 2027 review.** | |
| Synthetic image-prompt pairs used as the reference distribution for MGFlow | |
| text-to-image post-training in | |
| Unifying Distributional Training for One-Step Visual Generation. | |
| The same reference images support both image-only and joint image-text matching. | |
| Project page: https://mgflow-repo.github.io | |
| Model checkpoints and fitted reference distributions: | |
| [MGFlow/MGFlow](https://huggingface.co/MGFlow/MGFlow). | |
| ## Dataset contents | |
| The dataset contains **301,706 synthetic images at 512×512** with English prompts. | |
| All images were generated with the official distilled | |
| [FLUX.2 [klein] 4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B) | |
| model using four sampling steps and guidance scale 1. | |
| | Subset | Prompt source | Images | TAR shards | | |
| | --- | --- | ---: | ---: | | |
| | COCO | 82,783 COCO train2014 captions | 248,349 | 105 | | |
| | GenEval | 553 GenEval prompts | 53,357 | 19 | | |
| | Total | | 301,706 | 124 | | |
| Reference construction follows the procedure used by iRDM and AMFD: | |
| - **COCO:** use the first caption in annotation order for each train2014 image, | |
| generate 24 candidates per caption, and retain the three with the highest PickScore. | |
| - **GenEval:** retain up to 100 candidates per prompt that pass the official | |
| GenEval correctness test, considering up to 1,000 candidates when needed. | |
| Some prompts yield fewer than 100 passing images. | |
| The release contains generated images, not original COCO photographs. | |
| See the paper's text-to-image training details for the full construction protocol, | |
| and [ATTRIBUTION.md](ATTRIBUTION.md) for image and prompt sources. | |
| ## File structure | |
| ```text | |
| data/coco/train-*.tar COCO-derived image-prompt pairs | |
| data/geneval/train-*.tar GenEval image-prompt pairs | |
| metadata.jsonl One record per image: id, prompt, subset, shard, image | |
| manifest.json Image counts, shard sizes, and checksums | |
| ATTRIBUTION.md Source attribution and license notices | |
| ``` | |
| Each TAR shard stores pairs named `<id>.png` and `<id>.json` in WebDataset format. | |
| `metadata.jsonl` maps every image ID to its prompt and location in a shard; | |
| `manifest.json` lists the per-shard counts and SHA-256 checksums. | |
| ## Read a sample | |
| Install `huggingface_hub` and `pillow`. This example streams the first metadata | |
| record and its image without downloading the full dataset or a complete shard: | |
| ```python | |
| import json | |
| import tarfile | |
| from urllib.request import urlopen | |
| from huggingface_hub import hf_hub_url | |
| from PIL import Image | |
| repo_id = "MGFlow/MGFlow-T2I" | |
| metadata_url = hf_hub_url(repo_id, "metadata.jsonl", repo_type="dataset") | |
| with urlopen(metadata_url) as response: | |
| sample = json.loads(response.readline()) | |
| shard_url = hf_hub_url(repo_id, sample["shard"], repo_type="dataset") | |
| with urlopen(shard_url) as response: | |
| with tarfile.open(fileobj=response, mode="r|") as archive: | |
| for member in archive: | |
| if member.name == sample["image"]: | |
| with archive.extractfile(member) as image_file: | |
| image = Image.open(image_file).convert("RGB") | |
| break | |
| print(sample["prompt"]) | |
| print(image.size) | |
| ``` | |
| ## License | |
| Generated images and MGFlow-authored metadata are released under CC BY 4.0. | |
| Third-party prompts retain their original licenses; see [LICENSE.md](LICENSE.md) | |
| and [ATTRIBUTION.md](ATTRIBUTION.md). | |