Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
KohakuBlueleaf committed Oct 30, 2023
1 parent 5dc2a0d commit 583e2b2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions library/train_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def __init__(
image_dir: Optional[str],
num_repeats: int,
shuffle_caption: bool,
caption_seperator: str,
caption_separator: str,
keep_tokens: int,
color_aug: bool,
flip_aug: bool,
Expand All @@ -358,7 +358,7 @@ def __init__(
self.image_dir = image_dir
self.num_repeats = num_repeats
self.shuffle_caption = shuffle_caption
self.caption_seperator = caption_seperator
self.caption_separator = caption_separator
self.keep_tokens = keep_tokens
self.color_aug = color_aug
self.flip_aug = flip_aug
Expand All @@ -385,7 +385,7 @@ def __init__(
caption_extension: str,
num_repeats,
shuffle_caption,
caption_seperator: str,
caption_separator: str,
keep_tokens,
color_aug,
flip_aug,
Expand All @@ -405,7 +405,7 @@ def __init__(
image_dir,
num_repeats,
shuffle_caption,
caption_seperator,
caption_separator,
keep_tokens,
color_aug,
flip_aug,
Expand Down Expand Up @@ -439,7 +439,7 @@ def __init__(
metadata_file: str,
num_repeats,
shuffle_caption,
caption_seperator,
caption_separator,
keep_tokens,
color_aug,
flip_aug,
Expand All @@ -459,7 +459,7 @@ def __init__(
image_dir,
num_repeats,
shuffle_caption,
caption_seperator,
caption_separator,
keep_tokens,
color_aug,
flip_aug,
Expand Down Expand Up @@ -490,7 +490,7 @@ def __init__(
caption_extension: str,
num_repeats,
shuffle_caption,
caption_seperator,
caption_separator,
keep_tokens,
color_aug,
flip_aug,
Expand All @@ -510,7 +510,7 @@ def __init__(
image_dir,
num_repeats,
shuffle_caption,
caption_seperator,
caption_separator,
keep_tokens,
color_aug,
flip_aug,
Expand Down Expand Up @@ -646,7 +646,7 @@ def process_caption(self, subset: BaseSubset, caption):
caption = ""
else:
if subset.shuffle_caption or subset.token_warmup_step > 0 or subset.caption_tag_dropout_rate > 0:
tokens = [t.strip() for t in caption.strip().split(subset.caption_seperator)]
tokens = [t.strip() for t in caption.strip().split(subset.caption_separator)]
if subset.token_warmup_step < 1: # 初回に上書きする
subset.token_warmup_step = math.floor(subset.token_warmup_step * self.max_train_steps)
if subset.token_warmup_step and self.current_step < subset.token_warmup_step:
Expand Down Expand Up @@ -3102,7 +3102,7 @@ def add_dataset_arguments(
"--shuffle_caption", action="store_true", help="shuffle separated caption / 区切られたcaptionの各要素をshuffleする"
)
parser.add_argument(
"--caption_seperator", type=str, default=",", help="seperator for caption / captionの区切り文字"
"--caption_separator", type=str, default=",", help="separator for caption / captionの区切り文字"
)
parser.add_argument(
"--caption_extension", type=str, default=".caption", help="extension of caption files / 読み込むcaptionファイルの拡張子"
Expand Down

0 comments on commit 583e2b2

Please sign in to comment.