Skip to content

Commit

Permalink
update reg data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Akegarasu committed Feb 28, 2023
1 parent 6284050 commit abe2917
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions train.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Train data path | 设置训练用模型、图片
$pretrained_model = "./sd-models/model.ckpt" # base model path | 底模路径
$train_data_dir = "./train/aki" # train dataset path | 训练数据集路径
$reg_data_dir = "" # directory for regularization images | 正则化数据集路径,默认不使用正则化图像。

# Train related params | 训练相关参数
$resolution = "512,512" # image resolution w,h. 图片分辨率,宽,高。支持非正方形,但必须是 64 倍数。
Expand Down Expand Up @@ -56,6 +57,10 @@ if ($network_weights) {
[void]$ext_args.Add("--network_weights=" + $network_weights)
}

if ($reg_data_dir) {
[void]$ext_args.Add("--reg_data_dir=" + $network_weights)
}

if ($use_8bit_adam) {
[void]$ext_args.Add("--use_8bit_adam")
}
Expand Down
3 changes: 3 additions & 0 deletions train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Train data path | 设置训练用模型、图片
pretrained_model="./sd-models/model.ckpt" # base model path | 底模路径
train_data_dir="./train/aki" # train dataset path | 训练数据集路径
reg_data_dir="" # directory for regularization images | 正则化数据集路径,默认不使用正则化图像。

# Train related params | 训练相关参数
resolution="512,512" # image resolution w,h. 图片分辨率,宽,高。支持非正方形,但必须是 64 倍数。
Expand Down Expand Up @@ -49,6 +50,8 @@ if [ $train_text_encoder_only == 1 ]; then extArgs+=("--network_train_text_encod

if [ $network_weights ]; then extArgs+=("--network_weights $network_weights"); fi

if [ $reg_data_dir ]; then extArgs+=("--reg_data_dir $network_weights"); fi

if [ $use_8bit_adam == 1 ]; then extArgs+=("--use_8bit_adam"); fi

if [ $use_lion == 1 ]; then extArgs+=("--use_lion_optimizer"); fi
Expand Down

0 comments on commit abe2917

Please sign in to comment.