Skip to content

Commit

Permalink
docs controlnet data prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
okotaku committed Nov 28, 2023
1 parent 2888747 commit d07780e
Showing 1 changed file with 47 additions and 3 deletions.
50 changes: 47 additions & 3 deletions docs/source/user_guides/dataset_prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ train_dataloader = dict(
...
dataset=dict(
...
dataset='data/example',
image_column='file_name'
dataset="data/example",
image_column="file_name",
csv="metadata.csv",
...
)
...
)
Expand Down Expand Up @@ -56,7 +58,49 @@ train_dataloader = dict(
...
dataset=dict(
...
dataset='data/example',
dataset="data/example",
)
...
)
```

3. Run training.

## ControlNet

1. Prepare `metadata.csv` and images.

The folder structure is

```
data/example
├── images
| └── color.jpg
├── condition_images
| └── color_keypoint.jpg
└── metadata.csv
```

Example of `metadata.csv`.

```
file_name,conditioning_image,text
images/color.jpg,condition_images/color_keypoint.jpg,"a dog"
```

2. Fix dataset config.

```
train_dataloader = dict(
...
dataset=dict(
...
dataset="data/example",
image_column="file_name",
condition_column="conditioning_image",
caption_column="text",
csv="metadata.csv",
...
)
...
)
Expand Down

0 comments on commit d07780e

Please sign in to comment.