aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDepFA <35278260+dfaker@users.noreply.github.com>2022-10-09 22:17:02 +0100
committerGitHub <noreply@github.com>2022-10-09 22:17:02 +0100
commit01fd9cf0d28d8b71a113ab1aa62accfe7f0d9c51 (patch)
treeca927293e0be5444737c2ab65d2d1052e7f3378d
parent96f1e6be59316ec640cab2435fa95b3688194906 (diff)
change source of step count
-rw-r--r--modules/textual_inversion/textual_inversion.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py
index b16fa84e..e4f339b8 100644
--- a/modules/textual_inversion/textual_inversion.py
+++ b/modules/textual_inversion/textual_inversion.py
@@ -285,15 +285,9 @@ def train_embedding(embedding_name, learn_rate, data_root, log_directory, steps,
info.add_text("sd-ti-embedding", embeddingToB64(data))
pre_lines = [((255, 207, 175),"<{}>".format(data.get('name','???')))]
-
checkpoint = sd_models.select_checkpoint()
- caption_checkpoint_hash = checkpoint.hash
-
- caption_stepcount = data.get('step',0)
- caption_stepcount = caption_stepcount if caption_stepcount else 0
-
- post_lines = [((240, 223, 175),"Trained against checkpoint [{}] for {} steps".format(caption_checkpoint_hash,
- caption_stepcount))]
+ post_lines = [((240, 223, 175),"Trained against checkpoint [{}] for {} steps".format(checkpoint.hash,
+ embedding.step))]
captioned_image = captionImge(image,prelines=pre_lines,postlines=post_lines)
captioned_image.save(last_saved_image, "PNG", pnginfo=info)
else: