Skip to content

Commit

Permalink
Merge branch 'kohya-ss:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbds authored Apr 26, 2023
2 parents cc9af77 + 18f171d commit f6fda20
Show file tree
Hide file tree
Showing 3 changed files with 896 additions and 4 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ The scripts are tested with PyTorch 1.12.1 and 1.13.0, Diffusers 0.10.2.

## Links to how-to-use documents

All documents are in Japanese currently.
Most of the documents are written in Japanese.

* [Training guide - common](./train_README-ja.md) : data preparation, options etc...
* [Dataset config](./config_README-ja.md)
* [Training guide - common](./train_README-ja.md) : data preparation, options etc...
* [Chinese version](./train_README-zh.md)
* [Dataset config](./config_README-ja.md)
* [DreamBooth training guide](./train_db_README-ja.md)
* [Step by Step fine-tuning guide](./fine_tune_README_ja.md):
* [training LoRA](./train_network_README-ja.md)
Expand Down Expand Up @@ -126,6 +127,13 @@ The majority of scripts is licensed under ASL 2.0 (including codes from Diffuser

## Change History

### 26 Apr. 2023, 2023/04/26

- Added [Chinese translation](./train_README-zh.md) of training guide. [PR #445](https://github.com/kohya-ss/sd-scripts/pull/445) Thanks to tomj2ee!
- `tag_images_by_wd14_tagger.py` can now get arguments from outside. [PR #453](https://github.com/kohya-ss/sd-scripts/pull/453) Thanks to mio2333!
- 学習に関するドキュメントの[中国語版](./train_README-zh.md)が追加されました。 [PR #445](https://github.com/kohya-ss/sd-scripts/pull/445) tomj2ee氏に感謝します。
- `tag_images_by_wd14_tagger.py`の引数を外部から取得できるようになりました。 [PR #453](https://github.com/kohya-ss/sd-scripts/pull/453) mio2333氏に感謝します。

### 25 Apr. 2023, 2023/04/25

- Please do not update for a while if you cannot revert the repository to the previous version when something goes wrong, because the model saving part has been changed.
Expand Down
7 changes: 6 additions & 1 deletion finetune/tag_images_by_wd14_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def run_batch(path_imgs):
print("done!")


if __name__ == "__main__":
def setup_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
parser.add_argument("train_data_dir", type=str, help="directory for train images / 学習画像データのディレクトリ")
parser.add_argument(
Expand Down Expand Up @@ -284,6 +284,11 @@ def run_batch(path_imgs):
)
parser.add_argument("--frequency_tags", action="store_true", help="Show frequency of tags for images / 画像ごとのタグの出現頻度を表示する")

return parser

if __name__ == "__main__":
parser = setup_parser()

args = parser.parse_args()

# スペルミスしていたオプションを復元する
Expand Down
Loading

0 comments on commit f6fda20

Please sign in to comment.