mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
Fix typo
This commit is contained in:
@@ -341,7 +341,7 @@ class BaseSubset:
|
|||||||
image_dir: Optional[str],
|
image_dir: Optional[str],
|
||||||
num_repeats: int,
|
num_repeats: int,
|
||||||
shuffle_caption: bool,
|
shuffle_caption: bool,
|
||||||
caption_seperator: str,
|
caption_separator: str,
|
||||||
keep_tokens: int,
|
keep_tokens: int,
|
||||||
color_aug: bool,
|
color_aug: bool,
|
||||||
flip_aug: bool,
|
flip_aug: bool,
|
||||||
@@ -358,7 +358,7 @@ class BaseSubset:
|
|||||||
self.image_dir = image_dir
|
self.image_dir = image_dir
|
||||||
self.num_repeats = num_repeats
|
self.num_repeats = num_repeats
|
||||||
self.shuffle_caption = shuffle_caption
|
self.shuffle_caption = shuffle_caption
|
||||||
self.caption_seperator = caption_seperator
|
self.caption_separator = caption_separator
|
||||||
self.keep_tokens = keep_tokens
|
self.keep_tokens = keep_tokens
|
||||||
self.color_aug = color_aug
|
self.color_aug = color_aug
|
||||||
self.flip_aug = flip_aug
|
self.flip_aug = flip_aug
|
||||||
@@ -385,7 +385,7 @@ class DreamBoothSubset(BaseSubset):
|
|||||||
caption_extension: str,
|
caption_extension: str,
|
||||||
num_repeats,
|
num_repeats,
|
||||||
shuffle_caption,
|
shuffle_caption,
|
||||||
caption_seperator: str,
|
caption_separator: str,
|
||||||
keep_tokens,
|
keep_tokens,
|
||||||
color_aug,
|
color_aug,
|
||||||
flip_aug,
|
flip_aug,
|
||||||
@@ -405,7 +405,7 @@ class DreamBoothSubset(BaseSubset):
|
|||||||
image_dir,
|
image_dir,
|
||||||
num_repeats,
|
num_repeats,
|
||||||
shuffle_caption,
|
shuffle_caption,
|
||||||
caption_seperator,
|
caption_separator,
|
||||||
keep_tokens,
|
keep_tokens,
|
||||||
color_aug,
|
color_aug,
|
||||||
flip_aug,
|
flip_aug,
|
||||||
@@ -439,7 +439,7 @@ class FineTuningSubset(BaseSubset):
|
|||||||
metadata_file: str,
|
metadata_file: str,
|
||||||
num_repeats,
|
num_repeats,
|
||||||
shuffle_caption,
|
shuffle_caption,
|
||||||
caption_seperator,
|
caption_separator,
|
||||||
keep_tokens,
|
keep_tokens,
|
||||||
color_aug,
|
color_aug,
|
||||||
flip_aug,
|
flip_aug,
|
||||||
@@ -459,7 +459,7 @@ class FineTuningSubset(BaseSubset):
|
|||||||
image_dir,
|
image_dir,
|
||||||
num_repeats,
|
num_repeats,
|
||||||
shuffle_caption,
|
shuffle_caption,
|
||||||
caption_seperator,
|
caption_separator,
|
||||||
keep_tokens,
|
keep_tokens,
|
||||||
color_aug,
|
color_aug,
|
||||||
flip_aug,
|
flip_aug,
|
||||||
@@ -490,7 +490,7 @@ class ControlNetSubset(BaseSubset):
|
|||||||
caption_extension: str,
|
caption_extension: str,
|
||||||
num_repeats,
|
num_repeats,
|
||||||
shuffle_caption,
|
shuffle_caption,
|
||||||
caption_seperator,
|
caption_separator,
|
||||||
keep_tokens,
|
keep_tokens,
|
||||||
color_aug,
|
color_aug,
|
||||||
flip_aug,
|
flip_aug,
|
||||||
@@ -510,7 +510,7 @@ class ControlNetSubset(BaseSubset):
|
|||||||
image_dir,
|
image_dir,
|
||||||
num_repeats,
|
num_repeats,
|
||||||
shuffle_caption,
|
shuffle_caption,
|
||||||
caption_seperator,
|
caption_separator,
|
||||||
keep_tokens,
|
keep_tokens,
|
||||||
color_aug,
|
color_aug,
|
||||||
flip_aug,
|
flip_aug,
|
||||||
@@ -646,7 +646,7 @@ class BaseDataset(torch.utils.data.Dataset):
|
|||||||
caption = ""
|
caption = ""
|
||||||
else:
|
else:
|
||||||
if subset.shuffle_caption or subset.token_warmup_step > 0 or subset.caption_tag_dropout_rate > 0:
|
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: # 初回に上書きする
|
if subset.token_warmup_step < 1: # 初回に上書きする
|
||||||
subset.token_warmup_step = math.floor(subset.token_warmup_step * self.max_train_steps)
|
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:
|
if subset.token_warmup_step and self.current_step < subset.token_warmup_step:
|
||||||
@@ -3102,7 +3102,7 @@ def add_dataset_arguments(
|
|||||||
"--shuffle_caption", action="store_true", help="shuffle separated caption / 区切られたcaptionの各要素をshuffleする"
|
"--shuffle_caption", action="store_true", help="shuffle separated caption / 区切られたcaptionの各要素をshuffleする"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
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(
|
parser.add_argument(
|
||||||
"--caption_extension", type=str, default=".caption", help="extension of caption files / 読み込むcaptionファイルの拡張子"
|
"--caption_extension", type=str, default=".caption", help="extension of caption files / 読み込むcaptionファイルの拡張子"
|
||||||
|
|||||||
Reference in New Issue
Block a user