Fix dataset still being loaded even when training will be skipped
This commit is contained in:
parent
a07f054c86
commit
3d58510f21
|
@ -364,7 +364,7 @@ def train_hypernetwork(hypernetwork_name, learn_rate, batch_size, data_root, log
|
||||||
checkpoint = sd_models.select_checkpoint()
|
checkpoint = sd_models.select_checkpoint()
|
||||||
|
|
||||||
ititial_step = hypernetwork.step or 0
|
ititial_step = hypernetwork.step or 0
|
||||||
if ititial_step > steps:
|
if ititial_step >= steps:
|
||||||
shared.state.textinfo = f"Model has already been trained beyond specified max steps"
|
shared.state.textinfo = f"Model has already been trained beyond specified max steps"
|
||||||
return hypernetwork, filename
|
return hypernetwork, filename
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ def train_embedding(embedding_name, learn_rate, batch_size, data_root, log_direc
|
||||||
checkpoint = sd_models.select_checkpoint()
|
checkpoint = sd_models.select_checkpoint()
|
||||||
|
|
||||||
ititial_step = embedding.step or 0
|
ititial_step = embedding.step or 0
|
||||||
if ititial_step > steps:
|
if ititial_step >= steps:
|
||||||
shared.state.textinfo = f"Model has already been trained beyond specified max steps"
|
shared.state.textinfo = f"Model has already been trained beyond specified max steps"
|
||||||
return embedding, filename
|
return embedding, filename
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue