https://github.com/sayakpaul/instruct-pix2pix-dataset
This repository provides utilities to a minimal dataset for InstructPix2Pix like training for Diffusion models.
https://github.com/sayakpaul/instruct-pix2pix-dataset
Last synced: 5 months ago
JSON representation
This repository provides utilities to a minimal dataset for InstructPix2Pix like training for Diffusion models.
- Host: GitHub
- URL: https://github.com/sayakpaul/instruct-pix2pix-dataset
- Owner: sayakpaul
- Created: 2023-02-23T06:20:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T13:37:37.000Z (over 2 years ago)
- Last Synced: 2025-03-31T11:01:41.159Z (6 months ago)
- Language: Python
- Homepage: https://huggingface.co/datasets/timbrooks/instructpix2pix-clip-filtered
- Size: 16.6 KB
- Stars: 46
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository provides utilities to a minimal dataset for [InstructPix2Pix](https://arxiv.org/abs/2211.09800) like training for Diffusion models.
## Steps
1. Download the original dataset as discussed [here](https://github.com/timothybrooks/instruct-pix2pix#generated-dataset). I used this version: `clip-filtered-dataset`. Note that the download can take as long as 24 hours depending on the internet bandwidth. The dataset also requires at least 600 GB of storage.
2. Then run:```bash
python make_dataset.py --data_root clip-filtered-dataset --num_samples_to_use 1000
```
3. The `make_dataset.py` was specifically designed to obtain a [🤗 dataset](https://huggingface.co/docs/datasets/). So, it's the most useful when you push the minimal dataset to the 🤗 Hub. You can do so by setting `push_to_hub` while running `make_dataset.py`.## Example dataset
https://huggingface.co/datasets/sayakpaul/instructpix2pix-1000-samples
The full version of the CLIP filtered dataset used for InstructPix2Pix training can be found here: https://huggingface.co/datasets/timbrooks/instructpix2pix-clip-filtered
With the dataset being on the 🤗 Hub, one can do load the dataset with two lines of code:
```python
from datasets import load_datasetdataset = load_dataset("timbrooks/instructpix2pix-clip-filtered", split="train")
```And voila 🤗
## Acknowledgements
The structure of `make_dataset.py` is inspired by Nate Raw's [notebook](https://gist.github.com/nateraw/c91fb548c3a749cfbe6436d555a547b0).