source checkpoint hash from current checkpoint

This commit is contained in:
DepFA 2022-10-09 22:14:50 +01:00 committed by GitHub
parent 6684610510
commit 96f1e6be59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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','???')))] pre_lines = [((255, 207, 175),"<{}>".format(data.get('name','???')))]
caption_checkpoint_hash = data.get('sd_checkpoint') checkpoint = sd_models.select_checkpoint()
if caption_checkpoint_hash is None: caption_checkpoint_hash = checkpoint.hash
caption_checkpoint_hash = data.get('hash')
caption_checkpoint_hash = caption_checkpoint_hash.upper() if caption_checkpoint_hash else 'UNKNOWN'
caption_stepcount = data.get('step',0) caption_stepcount = data.get('step',0)
caption_stepcount = caption_stepcount if caption_stepcount else 0 caption_stepcount = caption_stepcount if caption_stepcount else 0