Compare commits

...

6 Commits

Author SHA1 Message Date
nickkolok
fd6aae7cec Merge 24d33083cb into 1a3ec9ea74 2026-03-13 03:23:59 +00:00
Kohya S.
1a3ec9ea74 Merge pull request #2280 from kohya-ss/fix-main-wd14-tagger-unbound-local-error
fix: rename character_tags to img_character_tags to fix UnboundLocalError
2026-02-26 08:21:42 +09:00
Kohya S
e1aedceffa fix: rename character_tags to img_character_tags to fix unboundlocalerror 2026-02-26 08:18:45 +09:00
nickkolok
24d33083cb Merge branch 'main' into typo20231122 2024-12-10 01:17:13 +03:00
NickKolok
2cb41dfe19 [typo] Fix two more similar typos: 'gradient ccumulation' -> 'gradient accumulation' 2024-12-10 01:15:29 +03:00
NickKolok
feeb289d6b [typo] 'gradient ccumulation' - 'gradient accumulation' 2023-11-22 19:52:52 +03:00
4 changed files with 8 additions and 8 deletions

View File

@@ -404,7 +404,7 @@ def main(args):
rating_tag = None
quality_max_prob = -1
quality_tag = None
character_tags = []
img_character_tags = []
min_thres = min(
args.thresh,
@@ -449,7 +449,7 @@ def main(args):
tag_freq[tag_name] = tag_freq.get(tag_name, 0) + 1
character_tag_text += caption_separator + tag_name
if args.character_tags_first: # we separate character tags
character_tags.append((tag_name, p))
img_character_tags.append((tag_name, p))
else:
combined_tags.append((tag_name, p))
elif (
@@ -464,9 +464,9 @@ def main(args):
# sort by probability
combined_tags.sort(key=lambda x: x[1], reverse=True)
if character_tags:
character_tags.sort(key=lambda x: x[1], reverse=True)
combined_tags = character_tags + combined_tags
if img_character_tags:
img_character_tags.sort(key=lambda x: x[1], reverse=True)
combined_tags = img_character_tags + combined_tags
combined_tags = [t[0] for t in combined_tags] # remove probability
if quality_tag is not None:

View File

@@ -290,7 +290,7 @@ def train(args):
accelerator.print(
f" total train batch size (with parallel & distributed & accumulation) / 総バッチサイズ(並列学習、勾配合計含む): {total_batch_size}"
)
accelerator.print(f" gradient ccumulation steps / 勾配を合計するステップ数 = {args.gradient_accumulation_steps}")
accelerator.print(f" gradient accumulation steps / 勾配を合計するステップ数 = {args.gradient_accumulation_steps}")
accelerator.print(f" total optimization steps / 学習ステップ数: {args.max_train_steps}")
progress_bar = tqdm(range(args.max_train_steps), smoothing=0, disable=not accelerator.is_local_main_process, desc="steps")

View File

@@ -497,7 +497,7 @@ class TextualInversionTrainer:
accelerator.print(
f" total train batch size (with parallel & distributed & accumulation) / 総バッチサイズ(並列学習、勾配合計含む): {total_batch_size}"
)
accelerator.print(f" gradient ccumulation steps / 勾配を合計するステップ数 = {args.gradient_accumulation_steps}")
accelerator.print(f" gradient accumulation steps / 勾配を合計するステップ数 = {args.gradient_accumulation_steps}")
accelerator.print(f" total optimization steps / 学習ステップ数: {args.max_train_steps}")
progress_bar = tqdm(range(args.max_train_steps), smoothing=0, disable=not accelerator.is_local_main_process, desc="steps")

View File

@@ -388,7 +388,7 @@ def train(args):
logger.info(
f" total train batch size (with parallel & distributed & accumulation) / 総バッチサイズ(並列学習、勾配合計含む): {total_batch_size}"
)
logger.info(f" gradient ccumulation steps / 勾配を合計するステップ数 = {args.gradient_accumulation_steps}")
logger.info(f" gradient accumulation steps / 勾配を合計するステップ数 = {args.gradient_accumulation_steps}")
logger.info(f" total optimization steps / 学習ステップ数: {args.max_train_steps}")
progress_bar = tqdm(range(args.max_train_steps), smoothing=0, disable=not accelerator.is_local_main_process, desc="steps")