fix minor errors

hypernetwork-tuning
aria1th 2023-01-16 06:49:46 +09:00
parent f75fd3bb97
commit 9d2e8bd963
2 changed files with 3 additions and 4 deletions

View File

@ -949,4 +949,4 @@ def train_hypernetwork_tuning(id_task, hypernetwork_name, data_root, log_directo
move_optimizer,
load_hypernetworks_option, load_training_option)
if shared.state.interrupted:
return
return None, None

View File

@ -48,11 +48,10 @@ def train_hypernetwork_ui_tuning(*args):
try:
sd_hijack.undo_optimizations()
hypernetwork, filename = train_hypernetwork_tuning(*args)
train_hypernetwork_tuning(*args)
res = f"""
Training {'interrupted' if shared.state.interrupted else 'finished'} at {hypernetwork.step} steps.
Hypernetwork saved to {html.escape(filename)}
Training {'interrupted' if shared.state.interrupted else 'finished'}.
"""
return res, ""
except Exception: