Commit b297cc33 authored by AngelBottomless's avatar AngelBottomless Committed by AUTOMATIC1111

Hypernetworks - fix KeyError in statistics caching

Statistics logging has changed to {filename : list[losses]}, so it has to use loss_info[key].pop()
parent f2cc3f32
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment