aboutsummaryrefslogtreecommitdiff
path: root/modules/hypernetworks/hypernetwork.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-23 13:14:14 -0300
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-23 13:14:54 -0300
commite3f0e34cd6de78a17fc22c9a45d28db774256e79 (patch)
treed1250116e3f7db5f14f06a9d27a49778751df736 /modules/hypernetworks/hypernetwork.py
parent4ff852ffb50859f2eae75375cab94dd790a46886 (diff)
parent6bd6154a92eb05c80d66df661a38f8b70cc13729 (diff)
Merge branch 'master' of https://github.com/bamarillo/stable-diffusion-webui
Diffstat (limited to 'modules/hypernetworks/hypernetwork.py')
-rw-r--r--modules/hypernetworks/hypernetwork.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py
index 99fd0f8f..98a7b62e 100644
--- a/modules/hypernetworks/hypernetwork.py
+++ b/modules/hypernetworks/hypernetwork.py
@@ -288,10 +288,13 @@ def statistics(data):
def report_statistics(loss_info:dict):
keys = sorted(loss_info.keys(), key=lambda x: sum(loss_info[x]) / len(loss_info[x]))
for key in keys:
- info, recent = statistics(loss_info[key])
- print("Loss statistics for file " + key)
- print(info)
- print(recent)
+ try:
+ print("Loss statistics for file " + key)
+ info, recent = statistics(loss_info[key])
+ print(info)
+ print(recent)
+ except Exception as e:
+ print(e)