diff options
author | DepFA <35278260+dfaker@users.noreply.github.com> | 2022-10-09 21:14:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-09 21:14:50 +0000 |
commit | 96f1e6be59316ec640cab2435fa95b3688194906 (patch) | |
tree | 573b2ae1aa1dd1ad5cd8c3684043c82027d6ad3c /modules/textual_inversion/textual_inversion.py | |
parent | 66846105103cfc282434d0dc2102910160b7a633 (diff) | |
download | stable-diffusion-webui-gfx803-96f1e6be59316ec640cab2435fa95b3688194906.tar.gz stable-diffusion-webui-gfx803-96f1e6be59316ec640cab2435fa95b3688194906.tar.bz2 stable-diffusion-webui-gfx803-96f1e6be59316ec640cab2435fa95b3688194906.zip |
source checkpoint hash from current checkpoint
Diffstat (limited to 'modules/textual_inversion/textual_inversion.py')
-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
|