Fix to show template type

This commit is contained in:
Kohya S
2023-07-10 22:28:26 +09:00
parent f54b784d88
commit 68ca0ea995
2 changed files with 3 additions and 3 deletions

View File

@@ -311,7 +311,7 @@ class TextualInversionTrainer:
# make captions: tokenstring tokenstring1 tokenstring2 ...tokenstringn という文字列に書き換える超乱暴な実装
if use_template:
accelerator.print("use template for training captions. is object: {args.use_object_template}")
accelerator.print(f"use template for training captions. is object: {args.use_object_template}")
templates = imagenet_templates_small if args.use_object_template else imagenet_style_templates_small
replace_to = " ".join(token_strings)
captions = []

View File

@@ -234,7 +234,7 @@ def train(args):
# make captions: tokenstring tokenstring1 tokenstring2 ...tokenstringn という文字列に書き換える超乱暴な実装
if use_template:
print("use template for training captions. is object: {args.use_object_template}")
print(f"use template for training captions. is object: {args.use_object_template}")
templates = imagenet_templates_small if args.use_object_template else imagenet_style_templates_small
replace_to = " ".join(token_strings)
captions = []