aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelBottomless <35677394+aria1th@users.noreply.github.com>2022-10-23 20:06:42 +0900
committerAUTOMATIC1111 <16777216c@gmail.com>2022-10-24 09:07:39 +0300
commitb297cc3324979ec78d69b2d11dd18030dfad7bcc (patch)
tree22546ea4f04b6947891c49b974bfc578af8d62d5
parentf2cc3f32d5bc8538e95edec54d7dc1b9efdf769a (diff)
Hypernetworks - fix KeyError in statistics caching
Statistics logging has changed to {filename : list[losses]}, so it has to use loss_info[key].pop()
-rw-r--r--modules/hypernetworks/hypernetwork.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py
index 98a7b62e..33827210 100644
--- a/modules/hypernetworks/hypernetwork.py
+++ b/modules/hypernetworks/hypernetwork.py
@@ -274,8 +274,8 @@ def log_statistics(loss_info:dict, key, value):
loss_info[key] = [value]
else:
loss_info[key].append(value)
- if len(loss_info) > 1024:
- loss_info.pop(0)
+ if len(loss_info[key]) > 1024:
+ loss_info[key].pop(0)
def statistics(data):