Skip to content

Commit

Permalink
Merge pull request #13 from okotaku/feat/dataset_docs
Browse files Browse the repository at this point in the history
[Docs] prepare dataset
  • Loading branch information
okotaku authored Aug 1, 2023
2 parents 07459cb + 3106bb6 commit 2e7f08d
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Other tutorials for:

- [Run Stable Diffusion](docs/source/run_sd.md)
- [Run Stable Diffusion XL](docs/source/run_sdxl.md)
- [Prepare Dataset](docs/source//dataset_prepare.md)

## Contributing

Expand Down
65 changes: 65 additions & 0 deletions docs/source/dataset_prepare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Prepare Dataset

## Finetune

1. Prepare `metadata.csv` and images.

The folder structure is

```
data/example
├── color.jpg
├── ...
└── metadata.csv
```

Example of `metadata.csv`.

```
file_name,text
color.jpg,"a dog"
```

2. Fix dataset config.

```
train_dataloader = dict(
...
dataset=dict(
...
dataset='data/example',
image_column='file_name'
)
...
)
```

3. Run training.

## DreamBooth

1. Prepare images.

The folder structure is

```
data/example
├── dog1.jpg
├── ...
└── dog5.jpg
```

2. Fix dataset config.

```
train_dataloader = dict(
...
dataset=dict(
...
dataset='data/example',
)
...
)
```

3. Run training.
6 changes: 6 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Welcome to diffengine's documentation!

run_sdxl.md

.. toctree::
:maxdepth: 2
:caption: Dataset Prepare

dataset_prepare.md

.. toctree::
:maxdepth: 1
:caption: API Reference
Expand Down

0 comments on commit 2e7f08d

Please sign in to comment.