diff options
author | DepFA <35278260+dfaker@users.noreply.github.com> | 2022-10-23 04:43:34 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-23 05:34:33 +0000 |
commit | 1fbfc052eb529d8cf8ce5baf578bcf93d0280c29 (patch) | |
tree | b0afb9c6f4eb8001332a94c482256d2ae90a0bc6 /modules/hypernetworks/hypernetwork.py | |
parent | 48dbf99e84045ee7af55bc5b1b86492a240e631e (diff) | |
download | stable-diffusion-webui-gfx803-1fbfc052eb529d8cf8ce5baf578bcf93d0280c29.tar.gz stable-diffusion-webui-gfx803-1fbfc052eb529d8cf8ce5baf578bcf93d0280c29.tar.bz2 stable-diffusion-webui-gfx803-1fbfc052eb529d8cf8ce5baf578bcf93d0280c29.zip |
Update hypernetwork.py
Diffstat (limited to 'modules/hypernetworks/hypernetwork.py')
-rw-r--r-- | modules/hypernetworks/hypernetwork.py | 11 |
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)
|