mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-15 07:03:06 +03:00
parent
a27d19de2e
commit
ab05a74ead
@ -398,8 +398,6 @@ def train_hypernetwork(hypernetwork_name, learn_rate, batch_size, data_root, log
|
||||
forced_filename = "<none>"
|
||||
|
||||
pbar = tqdm.tqdm(enumerate(ds), total=steps - ititial_step)
|
||||
|
||||
try:
|
||||
for i, entries in pbar:
|
||||
hypernetwork.step = i + ititial_step
|
||||
if len(loss_dict) > 0:
|
||||
@ -512,13 +510,6 @@ Last saved hypernetwork: {html.escape(last_saved_file)}<br/>
|
||||
Last saved image: {html.escape(last_saved_image)}<br/>
|
||||
</p>
|
||||
"""
|
||||
finally:
|
||||
if weights:
|
||||
for weight in weights:
|
||||
weight.requires_grad = False
|
||||
if unload:
|
||||
shared.sd_model.cond_stage_model.to(devices.device)
|
||||
shared.sd_model.first_stage_model.to(devices.device)
|
||||
|
||||
report_statistics(loss_dict)
|
||||
checkpoint = sd_models.select_checkpoint()
|
||||
|
@ -283,8 +283,6 @@ def train_embedding(embedding_name, learn_rate, batch_size, data_root, log_direc
|
||||
embedding_yet_to_be_embedded = False
|
||||
|
||||
pbar = tqdm.tqdm(enumerate(ds), total=steps-ititial_step)
|
||||
|
||||
try:
|
||||
for i, entries in pbar:
|
||||
embedding.step = i + ititial_step
|
||||
|
||||
@ -398,9 +396,6 @@ Last saved embedding: {html.escape(last_saved_file)}<br/>
|
||||
Last saved image: {html.escape(last_saved_image)}<br/>
|
||||
</p>
|
||||
"""
|
||||
finally:
|
||||
if embedding and embedding.vec is not None:
|
||||
embedding.vec.requires_grad = False
|
||||
|
||||
checkpoint = sd_models.select_checkpoint()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user