diff options
author | DepFA <35278260+dfaker@users.noreply.github.com> | 2022-10-09 22:14:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-09 22:14:50 +0100 |
commit | 96f1e6be59316ec640cab2435fa95b3688194906 (patch) | |
tree | 573b2ae1aa1dd1ad5cd8c3684043c82027d6ad3c /modules/textual_inversion | |
parent | 66846105103cfc282434d0dc2102910160b7a633 (diff) |
source checkpoint hash from current checkpoint
Diffstat (limited to 'modules/textual_inversion')
-rw-r--r-- | modules/textual_inversion/textual_inversion.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index d2b95fa3..b16fa84e 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -286,10 +286,8 @@ def train_embedding(embedding_name, learn_rate, data_root, log_directory, steps, pre_lines = [((255, 207, 175),"<{}>".format(data.get('name','???')))]
- caption_checkpoint_hash = data.get('sd_checkpoint')
- if caption_checkpoint_hash is None:
- caption_checkpoint_hash = data.get('hash')
- caption_checkpoint_hash = caption_checkpoint_hash.upper() if caption_checkpoint_hash else 'UNKNOWN'
+ 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
|