aboutsummaryrefslogtreecommitdiffstats
path: root/modules/hypernetwork.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-10-09 11:33:22 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-10-09 11:33:22 +0000
commit542a3d3a4a00c1383fbdaf938ceefef87cf834bb (patch)
tree90a5da1db886eb2c09e75075add56c2d2de774f4 /modules/hypernetwork.py
parent77a719648db515f10136e8b8483d5b16bda2eaeb (diff)
downloadstable-diffusion-webui-gfx803-542a3d3a4a00c1383fbdaf938ceefef87cf834bb.tar.gz
stable-diffusion-webui-gfx803-542a3d3a4a00c1383fbdaf938ceefef87cf834bb.tar.bz2
stable-diffusion-webui-gfx803-542a3d3a4a00c1383fbdaf938ceefef87cf834bb.zip
fix btoken hypernetworks in XY plot
Diffstat (limited to 'modules/hypernetwork.py')
-rw-r--r--modules/hypernetwork.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/hypernetwork.py b/modules/hypernetwork.py
index 19f1c227..498bc9d8 100644
--- a/modules/hypernetwork.py
+++ b/modules/hypernetwork.py
@@ -49,15 +49,18 @@ def list_hypernetworks(path):
def load_hypernetwork(filename):
- print(f"Loading hypernetwork {filename}")
path = shared.hypernetworks.get(filename, None)
- if (path is not None):
+ if path is not None:
+ print(f"Loading hypernetwork {filename}")
try:
shared.loaded_hypernetwork = Hypernetwork(path)
except Exception:
print(f"Error loading hypernetwork {path}", file=sys.stderr)
print(traceback.format_exc(), file=sys.stderr)
else:
+ if shared.loaded_hypernetwork is not None:
+ print(f"Unloading hypernetwork")
+
shared.loaded_hypernetwork = None